Commit Graph
27 Commits
Author SHA1 Message Date
Sascha Silbe 3b0e761f4a XoColor: don't choke if passed the wrong type (SL#1408)
Color data is stored in the Journal as a JSON dump, so we can get back
arbitrary types. XoColor already checks the color string for validity and
handles invalid strings gracefully, so it makes sense to enhance this to
invalid types as well.

Acked-by: Simon Schampijer <[email protected]>
2010-11-30 11:48:31 +00:00
Sascha Silbe 1adc165a8c bundlebuilder: ignore incorrect pylint warning
pylint isn't smart enough to figure out the return type of Popen.communicate(),
so squelch the warning.

Reviewed-by: James Cameron <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
CC: Aleksey Lim <[email protected]>
2010-11-23 17:14:37 +01:00
Sascha Silbe 46deeb64e6 pylint: sugar.wm._property_change_trapped: allow overriding built-in method
"format" is the name of a parameter of the function we are wrapping, so we
shouldn't change it.

Reviewed-by: James Cameron <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
CC: Aleksey Lim <[email protected]>
2010-11-23 17:14:36 +01:00
Sascha Silbe 0521234fec CellRendererInvoker._redraw_path(): assure column is defined
We know that our code is correct and column should always be assigned, but it
never hurts to act defensively and guard against bugs in other pieces of the
code (or other components like GTK).

Reviewed-by: James Cameron <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
CC: Aleksey Lim <[email protected]>
2010-11-23 17:14:36 +01:00
Sascha Silbe 05fd5fe2d7 ToolInvoker._get_alignments: fix missing self parameter
Caught by pylint. I wonder if we need this piece of code as nobody every
triggered it.

Reviewed-by: James Cameron <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
CC: Aleksey Lim <[email protected]>
2010-11-23 17:14:36 +01:00
Sascha Silbe 7983242f7a pylint cleanup: initialise all attributes in __init__()
Reviewed-by: James Cameron <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
CC: Aleksey Lim <[email protected]>
2010-11-23 17:14:36 +01:00
Sascha Silbe adba508d8f pylint cleanup: pass format parameters to log functions instead of using %
This avoids the overhead from the string formatting on production systems.

Reviewed-by: James Cameron <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
CC: Aleksey Lim <[email protected]>
2010-11-23 17:14:35 +01:00
Sascha Silbe ff16cb0fa9 pylint cleanup: disable warnings for reasonable catch-all exception handlers
Reviewed-by: James Cameron <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
CC: Aleksey Lim <[email protected]>
2010-11-23 17:14:35 +01:00
Sascha Silbe 431e36a427 sugar.util: use logging.exception instead of traceback.format_exc()
logging.exception() handles exceptions nicely for us, no need to explicitly
use traceback.

Reviewed-by: James Cameron <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
CC: Aleksey Lim <[email protected]>
2010-11-23 17:14:35 +01:00
Sascha Silbe 3d227102c4 pylint cleanup: remove unused imports
Reviewed-by: James Cameron <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
CC: Aleksey Lim <[email protected]>
2010-11-23 17:14:35 +01:00
Sascha Silbe eacce98f88 pylint cleanup: replace disable-msg with disable
Adapt to upstream format change.

Reviewed-by: James Cameron <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
CC: Aleksey Lim <[email protected]>
2010-11-23 17:14:34 +01:00
Sascha Silbe 7acfbd070f style cleanup: prefer ' for strings
Tomeu prefers ' for strings, so let's use it wherever we don't have a good
reason to use ".

Reviewed-by: James Cameron <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
CC: Aleksey Lim <[email protected]>
2010-11-23 17:14:34 +01:00
Sascha Silbe 5f13fcfc84 style cleanup: use """ everywhere
Most of the code uses """, so adjust the few deviations.

Reviewed-by: James Cameron <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
CC: Aleksey Lim <[email protected]>
2010-11-23 17:14:34 +01:00
Sascha Silbe 5f8ec81023 PEP8 cleanup: fix deprecated raise syntax
Reviewed-by: James Cameron <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
CC: Aleksey Lim <[email protected]>
2010-11-23 17:14:34 +01:00
Sascha Silbe 9c7769cc21 PEP8 cleanup: fix whitespace before ':'
Reviewed-by: James Cameron <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
CC: Aleksey Lim <[email protected]>
2010-11-23 17:14:33 +01:00
Sascha Silbe 73de340d27 PEP8 cleanup: fix spaces around keyword parameters
Reviewed-by: James Cameron <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
CC: Aleksey Lim <[email protected]>
2010-11-23 17:14:33 +01:00
Sascha Silbe 72ed58cbca PEP8 cleanup: fix inline comment spacing
pep8 wants inline comments to be prefixed by at least two spaces. Let's just
move them to a separate line as that's easier to read anyway.

Acked-by: Simon Schampijer <[email protected]>
CC: Aleksey Lim <[email protected]>
2010-11-23 17:14:33 +01:00
Sascha Silbe 60707443ea PEP8 cleanup: fix whitespace around operator
Reviewed-by: James Cameron <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
CC: Aleksey Lim <[email protected]>
2010-11-23 17:14:33 +01:00
Sascha Silbe 814ab2ddf9 PEP8 cleanup: don't use has_key()
has_key() has been deprecated for quite some time now.

Acked-by: Simon Schampijer <[email protected]>
CC: Aleksey Lim <[email protected]>
2010-11-23 17:14:32 +01:00
Sascha Silbe 4d978fda14 PEP8 cleanup: ensure lines are shorter than 80 characters
Caught by PEP8. This is important for Sugar because the XO has a small screen
where long lines would make the code hard to understand (because you need to
constantly scroll horizontally).

Reviewed-by: James Cameron <[email protected]>
Acked-by: Simon Schampijer<[email protected]>
CC: Aleksey Lim <[email protected]>
2010-11-23 17:14:32 +01:00
Sascha Silbe e2231d5620 PEP8 cleanup: fix number of blank lines
Caught by pep8.

Reviewed-by: James Cameron <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
CC: Aleksey Lim <[email protected]>
2010-11-23 17:14:32 +01:00
Sascha Silbe 131c28bb72 fix EOL spaces
Reviewed-by: James Cameron <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
CC: Aleksey Lim <[email protected]>
2010-11-23 17:14:31 +01:00
Sascha Silbe bb323a4efa check syntax of private key (#1568)
Check that header and footer of the private key are present in order to detect
corrupted key files.

Signed-off-by: Sascha Silbe <[email protected]>
2010-03-09 23:34:59 +00:00
Sascha Silbe d38d865c7c Revert "Merge commit 'refs/top-bases/t/bug-1568' into t/bug-1568"
This reverts commit 12016d5408, reversing
changes made to d006092d37.
2010-03-09 23:28:18 +00:00
Sascha Silbe 12016d5408 Merge commit 'refs/top-bases/t/bug-1568' into t/bug-1568 2010-03-09 22:59:57 +00:00
Sascha Silbe b64930b2eb check private key syntax 2010-03-08 20:54:05 +00:00
Sascha Silbe 0a4ea3ec9a set description 2010-03-08 20:53:46 +00:00