Use --verbose if you really want a full traceback with your 'you made a
typo in an package ID' messages.
It would be better to do this based on exception types (i.e. our own
exceptions - MetadataException, BuildException, VCSException) would not
print a traceback, but unexpected exceptions would. But the types are
not available at the 'fdroid' level currently.
del sys.argv[1]
mod = __import__('fdroidserver.' + command, None, None, [command])
- mod.main()
+ try:
+ mod.main()
+ except Exception, e:
+ if verbose:
+ raise
+ else:
+ print str(e)
+ sys.exit(1)
sys.exit(0)
if __name__ == "__main__":
return ret
def __str__(self):
- ret = repr(self.value)
+ ret = self.value
if self.detail:
ret += "\n==== detail begin ====\n%s\n==== detail end ====" % self.detail.strip()
return ret
self.value = value
def __str__(self):
- return repr(self.value)
+ return self.value
# Get the specified source library.
import cgi
import logging
+srclibs = []
class MetaDataException(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
- return repr(self.value)
+ return self.value
app_defaults = {
'Name': None,