Merge lp:~blueyed/pastebinit/format-from-conf-defaults into lp:pastebinit

Proposed by Daniel Hahler
Status: Merged
Merged at revision: 219
Proposed branch: lp:~blueyed/pastebinit/format-from-conf-defaults
Merge into: lp:pastebinit
Diff against target: 38 lines (+7/-4)
1 file modified
pastebinit (+7/-4)
To merge this branch: bzr merge lp:~blueyed/pastebinit/format-from-conf-defaults
Reviewer Review Type Date Requested Status
Pastebinit Developers Pending
Review via email: mp+203650@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'pastebinit'
--- pastebinit 2014-01-18 04:51:35 +0000
+++ pastebinit 2014-01-29 01:36:12 +0000
@@ -24,11 +24,11 @@
2424
25import sys25import sys
26if sys.version[0] == "2":26if sys.version[0] == "2":
27 from ConfigParser import SafeConfigParser27 from ConfigParser import SafeConfigParser, NoOptionError
28 from urllib import urlencode28 from urllib import urlencode
29 from urllib import FancyURLopener29 from urllib import FancyURLopener
30else:30else:
31 from configparser import SafeConfigParser31 from configparser import SafeConfigParser, NoOptionError
32 from urllib.parse import urlencode32 from urllib.parse import urlencode
33 from urllib.request import FancyURLopener33 from urllib.request import FancyURLopener
3434
@@ -165,7 +165,10 @@
165 elif param == 'version':165 elif param == 'version':
166 params[paramname] = version166 params[paramname] = version
167 elif param == 'format':167 elif param == 'format':
168 params[paramname] = format168 try:
169 params[paramname] = paste_config.get('defaults', 'format')
170 except NoOptionError:
171 params[paramname] = format
169 elif param == 'parentpid':172 elif param == 'parentpid':
170 params[paramname] = doParentFixup(website, paramname,173 params[paramname] = doParentFixup(website, paramname,
171 parentpid)174 parentpid)
@@ -213,7 +216,7 @@
213 file=fd)216 file=fd)
214 print(_("\t-a <author:default is '%s'>") % user, file=fd)217 print(_("\t-a <author:default is '%s'>") % user, file=fd)
215 print(_("\t-b <pastebin url:default is '%s'>") % website, file=fd)218 print(_("\t-b <pastebin url:default is '%s'>") % website, file=fd)
216 print(_("\t-f <format of paste:default is '%s'>") % format, file=fd)219 print(_("\t-f <format of paste:default is '%s' (or from pastebin config)>") % format, file=fd) # noqa
217 print(_("\t-h This help screen"), file=fd)220 print(_("\t-h This help screen"), file=fd)
218 print(_("\t-i <input file>"), file=fd)221 print(_("\t-i <input file>"), file=fd)
219 print(_("\t-l List all supported pastebins"), file=fd)222 print(_("\t-l List all supported pastebins"), file=fd)

Subscribers

People subscribed via source and target branches

to all changes: