1
0
Fork 0

Support a per-aircraft exclude file.

- needed to make the P51D not be crazy large.
This commit is contained in:
James Turner 2015-07-29 15:09:01 -05:00
parent d2cb130135
commit f61ceb1293

View file

@ -170,9 +170,16 @@ class PackageData:
os.chdir(os.path.dirname(self.path))
print "Creating zip", zipFilePath
# TODO: exclude certain files
# anything we can do to make this faster?
subprocess.call(['zip', '--quiet', '-r', zipFilePath, self.id])
zipArgs = ['zip', '--quiet', '-r']
excludePath = os.path.join(self.path, 'package-exclude.lst')
if (os.path.exists(excludePath)):
print self.id, "has zip exclude list"
zipArgs += ["-x@" + excludePath]
zipArgs += [zipFilePath, self.id]
subprocess.call(zipArgs)
zipFile = open(zipFilePath, 'r')
self._md5 = hashlib.md5(zipFile.read()).hexdigest()