Skip to content

Commit

Permalink
pastebinit: set default pastebin according to OS for Ubuntu and Debian
Browse files Browse the repository at this point in the history
Author: Mario Limonciello <superm1@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/pastebinit/+bug/648298

This patch has been tested for a few months in Debian experimental. pushing upstream.
  • Loading branch information
leggewie committed Jan 10, 2011
1 parent be7f57d commit a68c843
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion pastebinit
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,24 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

defaultPB = "http://pastebin.com" #Default pastebin
try:
import lsb_release
release = lsb_release.get_distro_information()['ID'].lower()
if release == 'ubuntu':
defaultPB = "http://paste.ubuntu.com"
elif release == 'debian':
defaultPB = "http://paste.debian.net"
except ImportError:
pass

try:
import urllib, os, sys, re, getopt, xml.dom.minidom, gettext
from gettext import gettext as _
import configobj

gettext.textdomain("pastebinit")

defaultPB = "http://pastebin.com" #Default pastebin
version = "1.1" #Version number to show in the usage
configfile = os.path.expanduser("~/.pastebinit.xml")

Expand Down

0 comments on commit a68c843

Please sign in to comment.