[gnome-tweak-tool] Avoid harmless warning trying to split None autostartcondition
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool] Avoid harmless warning trying to split None autostartcondition
- Date: Wed, 17 Jul 2013 21:27:38 +0000 (UTC)
commit cdcd3c8cdeccbfbbe96cd01061a314da2ca2cd80
Author: Andreas Henriksson <andreas fatal se>
Date: Mon Jun 24 19:24:24 2013 +0200
Avoid harmless warning trying to split None autostartcondition
When self.get_austostart_condition() returns None and
autostart_type is not None, the following code will
try to apply split on None.
The exception handling catches this and returns the correct
value for the function in this case so it's harmless,
this just fixes so that there's no traceback in the application
output....
https://bugzilla.gnome.org/show_bug.cgi?id=702994
gtweak/utils.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtweak/utils.py b/gtweak/utils.py
index 7d72b77..097981e 100644
--- a/gtweak/utils.py
+++ b/gtweak/utils.py
@@ -156,7 +156,7 @@ class AutostartManager:
def uses_autostart_condition(self, autostart_type=None):
asc = self.get_autostart_condition()
try:
- if autostart_type:
+ if asc and autostart_type:
return asc.split(" ", 1)[0] == autostart_type
else:
return asc != None
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]