[PATCH 0 of 2] A couple of patches for rc2

0 views
Skip to first unread message

Ignacio Vazquez-Abrams

unread,
Mar 18, 2009, 7:07:50 PM3/18/09
to transif...@googlegroups.com
Here's a couple of patches for rc2. Nothing huge, but even incremental changes help.

Ignacio Vazquez-Abrams

unread,
Mar 18, 2009, 7:07:51 PM3/18/09
to transif...@googlegroups.com
# HG changeset patch
# User Ignacio Vazquez-Abrams <ivazque...@gmail.com>
# Date 1237389825 14400
# Node ID 79eba0dec37c7326bbd69abd87fae11ac9b93e7e
# Parent 74c077c95937fb55dcfa79920e3aaeddc6b4aadb
Slightly better error handling on submission

diff -r 74c077c95937 -r 79eba0dec37c projects/views.py
--- a/projects/views.py Wed Mar 18 11:19:19 2009 -0400
+++ b/projects/views.py Wed Mar 18 11:23:45 2009 -0400
@@ -332,10 +332,10 @@
" pass by the check for correctness" \
" (msgfmt -c). Please run this command" \
" on your system to see the errors."))
- except:
+ except StandardError, e:
logger.debug("Error submiting translation file %s"
- " for %s component" % (filename,
- component.full_name))
+ " for %s component: %r" % (filename,
+ component.full_name, e))
# TODO: Figure out why gettext is not working here
request.user.message_set.create(message = (
"Sorry, an error is causing troubles to send your file."))

Ignacio Vazquez-Abrams

unread,
Mar 18, 2009, 7:07:52 PM3/18/09
to transif...@googlegroups.com
# HG changeset patch
# User Ignacio Vazquez-Abrams <ivazque...@gmail.com>
# Date 1237389559 14400
# Node ID 74c077c95937fb55dcfa79920e3aaeddc6b4aadb
# Parent 8b35156107133b286aad66b329e933b373eb52ec
Base CommandError off something a bit more specific

diff -r 8b3515610713 -r 74c077c95937 vcs/lib/support/commands.py
--- a/vcs/lib/support/commands.py Tue Mar 17 22:50:08 2009 -0400
+++ b/vcs/lib/support/commands.py Wed Mar 18 11:19:19 2009 -0400
@@ -34,7 +34,7 @@
return kwarglist


-class CommandError(Exception):
+class CommandError(StandardError):
def __init__(self, command, status, stderr=None):
self.stderr = stderr
self.status = status

Reply all
Reply to author
Forward
0 new messages