~ubuntu-branches/ubuntu/quantal/wicd/quantal

« back to all changes in this revision

Viewing changes to wicd/misc.py

  • Committer: Package Import Robot
  • Author(s): David Paleino
  • Date: 2012-04-22 18:42:19 UTC
  • mfrom: (8.2.25 sid)
  • Revision ID: package-import@ubuntu.com-20120422184219-665ml2w32oju9wa9
Tags: 1.7.2.3-1
* New upstram version
  - fix bug with wicd-curses and UTF-8 locales (Closes: #669602)

Show diffs side-by-side

added added

removed removed

Lines of Context:
425
425
    else:
426
426
        return to_unicode(text)
427
427
 
 
428
def sanitize_config(s):
 
429
    """ Sanitize property names to be used in config-files. """
 
430
    s = s.strip()
 
431
    s = s.replace('=', '')
 
432
    s = s.replace(' ', '')
 
433
    s = s.replace('\n', '')
 
434
    return s
 
435
 
428
436
def sanitize_escaped(s):
429
437
    """ Sanitize double-escaped unicode strings. """
430
438
    lastpos = -1