def getArchitecture(config):
cmd = commandInBuildEnv(config, ['dpkg-architecture', '-qDEB_HOST_ARCH'])
output = subprocess.check_output(cmd)
- return output.decode('utf-8').strip('\n') # chop of the \n at the end
+ return output.decode('utf-8').strip('\n') # chop off the \n at the end
def writeDependency(f, name, list):
if len(list):
print(name+": "+', '.join(list), file=f)
+# actual work functions
def deleteDebianFolder():
if os.path.islink('debian'):
target = os.readlink('debian')
if os.path.exists(target):
shutil.rmtree(target)
os.remove('debian')
- else:
+ elif os.path.exists('debian'):
shutil.rmtree('debian')
-# actual work functions
def createDebianFiles(config):
if not isinstance(config, ConfigDict):
config = ConfigDict(config)