Changeset 41:9753fcb9f750 in misc for filearchive
- Timestamp:
- 02/13/08 07:53:15 (4 years ago)
- Branch:
- misc
- Convert:
- svn:e60e002c-0983-44b9-b2ae-8842d539f768/misc@44
- File:
-
- 1 edited
-
filearchive/filearchive (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
filearchive/filearchive
r40 r41 26 26 import optparse 27 27 import os 28 import platform29 28 import subprocess 30 29 import sys … … 32 31 33 32 SETTINGS = {} 34 35 if platform.system() == 'Linux':36 crypt_program = 'mcrypt'37 elif platform.system() == 'Windows':38 crypt_program = 'mcrypt.exe' # TODO: check it!39 33 40 34 def md5sum(f): … … 139 133 140 134 if SETTINGS['encrypt']: 135 archive_ext = '.nc' 136 141 137 password = getpass.getpass() 142 138 path = os.path.join(output_directory, '*.zip') 143 command = ' %s -F %s -k %s -u' % (crypt_program,path, password)139 command = 'mcrypt %s -k %s -u' % (path, password) 144 140 145 141 subprocess.call(command, shell=True) 142 else: 143 archive_ext = '.zip' 146 144 147 145 print 'Generating md5sum...' … … 154 152 name, ext = os.path.splitext(f) 155 153 name = name[:len(archive_name)] 156 if name == archive_name and (ext == '.zip' or ext == '.nc'):154 if name == archive_name and ext == archive_ext: 157 155 file_path = os.path.join(output_directory, f) 158 156 fi = open(file_path)
Note: See TracChangeset
for help on using the changeset viewer.
