chiark
/
gitweb
/
~ianmdlvl
/
fdroidserver.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't use generic Exception raises
[fdroidserver.git]
/
fdroidserver
/
common.py
diff --git
a/fdroidserver/common.py
b/fdroidserver/common.py
index 93f811874a9e97752e7a0204d34aeb01281c7942..ce3acc12fa3a21bb0ac9d68ca7c9c297b55350c0 100644
(file)
--- a/
fdroidserver/common.py
+++ b/
fdroidserver/common.py
@@
-259,9
+259,9
@@
def read_app_args(args, allapps, allow_vercodes=False):
for p in vercodes:
if p not in allids:
logging.critical("No such package: %s" % p)
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
FDroid
Exception("Found invalid app ids in arguments")
if not apps:
if not apps:
- raise Exception("No packages specified")
+ raise
FDroid
Exception("No packages specified")
error = False
for app in apps:
error = False
for app in apps:
@@
-277,7
+277,7
@@
def read_app_args(args, allapps, allow_vercodes=False):
logging.critical("No such vercode %s for app %s" % (v, app['id']))
if error:
logging.critical("No such vercode %s for app %s" % (v, app['id']))
if error:
- raise Exception("Found invalid vercodes for some apps")
+ raise
FDroid
Exception("Found invalid vercodes for some apps")
return apps
return apps
@@
-299,7
+299,7
@@
def apknameinfo(filename):
try:
result = (m.group(1), m.group(2))
except AttributeError:
try:
result = (m.group(1), m.group(2))
except AttributeError:
- raise Exception("Invalid apk name: %s" % filename)
+ raise
FDroid
Exception("Invalid apk name: %s" % filename)
return result
return result