~tj/pastebinit/review_paste

« back to all changes in this revision

Viewing changes to pastebinit

  • Committer: Stéphane Graber
  • Date: 2014-01-18 04:27:41 UTC
  • Revision ID: stgraber@ubuntu.com-20140118042741-gs3bwwrcdjo6j3g0
Skip pastebin definitions which can't be read with current system encoding.

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
 
100
100
                filename = os.path.join(confdir, fileitem)
101
101
                instance = SafeConfigParser()
102
 
                instance.read(filename)
 
102
                try:
 
103
                    instance.read(filename)
 
104
                except UnicodeError:
 
105
                    continue
103
106
 
104
107
                if not instance.has_section('pastebin'):
105
108
                    print(_('%s: no section [pastebin]') % filename,