mirror of
https://github.com/gryf/wicd.git
synced 2025-12-20 04:48:00 +01:00
Refactored networking.py to be more modular.
Added docstrings to wnettools.py Fixed wired autoconnect bug due to missing parenthesis on a method call. Moved connection monitoring code out of daemon.py and into monitor.py, which is run as a separate, child process of daemon.py, to reduce delays in dbus reponse time while connection status and autoreconnect code is running. Added full support for running the gui without the tray icon using the --no-tray option. Some minor changes to code to be more readable/efficient/pythonic.
This commit is contained in:
3
misc.py
3
misc.py
@@ -247,11 +247,10 @@ def get_gettext():
|
||||
return _
|
||||
|
||||
def to_unicode(x):
|
||||
""" Attempts to convert a string to unicode """
|
||||
""" Attempts to convert a string to utf-8. """
|
||||
try: # This may never fail, but let's be safe
|
||||
default_encoding = locale.getpreferredencoding()
|
||||
except:
|
||||
print 'Could not get default encoding'
|
||||
default_encoding = None
|
||||
|
||||
if default_encoding:
|
||||
|
||||
Reference in New Issue
Block a user