for p in vercodes:
if p not in allids:
logging.critical("No such package: %s" % p)
- raise Exception("Found invalid app ids in arguments")
+ raise FDroidException("Found invalid app ids in arguments")
if not apps:
- raise Exception("No packages specified")
+ raise FDroidException("No packages specified")
error = False
for app in apps:
logging.critical("No such vercode %s for app %s" % (v, app['id']))
if error:
- raise Exception("Found invalid vercodes for some apps")
+ raise FDroidException("Found invalid vercodes for some apps")
return apps
try:
result = (m.group(1), m.group(2))
except AttributeError:
- raise Exception("Invalid apk name: %s" % filename)
+ raise FDroidException("Invalid apk name: %s" % filename)
return result
def remove_debuggable_flags(root_dir):
# Remove forced debuggable flags
- logging.info("Removing debuggable flags from %s" % root_dir)
+ logging.debug("Removing debuggable flags from %s" % root_dir)
for root, dirs, files in os.walk(root_dir):
if 'AndroidManifest.xml' in files:
path = os.path.join(root, 'AndroidManifest.xml')
for d in update_dirs:
subdir = os.path.join(root_dir, d)
if d == '.':
- logging.info("Updating main project")
+ logging.debug("Updating main project")
cmd = parms + ['-p', d]
else:
- logging.info("Updating subproject %s" % d)
+ logging.debug("Updating subproject %s" % d)
cmd = lparms + ['-p', d]
p = FDroidPopen(cmd, cwd=root_dir)
# Check to see whether an error was returned without a proper exit
while not stdout_reader.eof():
while not stdout_queue.empty():
line = stdout_queue.get()
- if output:
+ if output or options.verbose:
# Output directly to console
- sys.stdout.write(line)
- sys.stdout.flush()
+ sys.stderr.write(line)
+ sys.stderr.flush()
result.output += line
time.sleep(0.1)