ctrochalakis /
tx-submissions
(http://transifex.org/)
fork of transifex
GSoC '08: Introducing a new transifex submission system, an api and a command line client
Clone URL : http://bitbucket.org/ctrochalakis/tx-submissions/ (size: 1.4 MB)
| commit 444: | dd93961c311b |
| parent 443: | f476807fdc73 |
| branch: | default |
minor: add some exception messages
Changed (Δ68 bytes):
raw changeset »
transifex/submissions/__init__.py (2 lines added, 2 lines removed)
Up to file-list transifex/submissions/__init__.py:
| … | … | @@ -41,7 +41,7 @@ class SResource(): |
41 |
41 |
def __init__(self,module_name, branch_name=None): |
42 |
42 |
self.module = Module.query.filter_by(name=module_name).first() |
43 |
43 |
if not self.module: |
44 |
raise SResourceError( |
|
44 |
raise SResourceError('No module named %s' % module_name) |
|
45 |
45 |
|
46 |
46 |
if branch_name: |
47 |
47 |
self.branch = self.module.query_branches.filter_by(name=branch_name).first() |
| … | … | @@ -49,7 +49,7 @@ class SResource(): |
49 |
49 |
self.branch = self.module.default_branch |
50 |
50 |
|
51 |
51 |
if not self.branch: |
52 |
raise SResourceError( |
|
52 |
raise SResourceError('No branch named %s' % branch_name) |
|
53 |
53 |
|
54 |
54 |
try: |
55 |
55 |
self.submitter = get_submission_class(self.module.submission_method)(self) |
