| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1575,6 +1575,9 @@ def settext(self, s, c=None, p=False): | |||
| 1575 | 1575 | self.c = c | |
| 1576 | 1576 | ||
| 1577 | 1577 | if s: | |
| 1578 | + if not py3 and isinstance(s, unicode): | ||
| 1579 | + s = s.encode(getpreferredencoding()) | ||
| 1580 | + | ||
| 1578 | 1581 | if self.c: | |
| 1579 | 1582 | self.win.addstr(s, self.c) | |
| 1580 | 1583 | else: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -228,9 +228,14 @@ def getargspec(func, f): | |||
| 228 | 228 | # not take 'self', the latter would: | |
| 229 | 229 | func_name = getattr(f, '__name__', None) | |
| 230 | 230 | ||
| 231 | - is_bound_method = ((inspect.ismethod(f) and f.im_self is not None) | ||
| 231 | + try: | ||
| 232 | + is_bound_method = ((inspect.ismethod(f) and f.im_self is not None) | ||
| 232 | 233 | or (func_name == '__init__' and not | |
| 233 | 234 | func.endswith('.__init__'))) | |
| 235 | + except: | ||
| 236 | + # if f is a method from a xmlrpclib.Server instance, func_name == | ||
| 237 | + # '__init__' throws xmlrpclib.Fault (see #202) | ||
| 238 | + return None | ||
| 234 | 239 | try: | |
| 235 | 240 | if py3: | |
| 236 | 241 | argspec = inspect.getfullargspec(f) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -749,7 +749,12 @@ def pastebin(self, s=None): | |||
| 749 | 749 | self.interact.notify("Pastebin aborted") | |
| 750 | 750 | return | |
| 751 | 751 | ||
| 752 | - pasteservice = ServerProxy(self.config.pastebin_url) | ||
| 752 | + try: | ||
| 753 | + pasteservice = ServerProxy(self.config.pastebin_url) | ||
| 754 | + except IOError, e: | ||
| 755 | + self.interact.notify("Pastebin error for URL '%s': %s" % | ||
| 756 | + (self.config.pastebin_url, str(e))) | ||
| 757 | + return | ||
| 753 | 758 | ||
| 754 | 759 | if s == self.prev_pastebin_content: | |
| 755 | 760 | self.interact.notify('Duplicate pastebin. Previous URL: ' + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -50,7 +50,7 @@ def initialize_options(self): | |||
| 50 | 50 | cmdclass['extract_messages'] = extract_messages | |
| 51 | 51 | ||
| 52 | 52 | ||
| 53 | - if platform.system() == 'FreeBSD': | ||
| 53 | + if platform.system() in ['FreeBSD', 'OpenBSD']: | ||
| 54 | 54 | man_dir = 'man' | |
| 55 | 55 | else: | |
| 56 | 56 | man_dir = 'share/man' | |
| Back | FazBrowse Home | New Git URL |
0 commit comments