Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 626349 Details for
Bug 865971
[Patch] Make fedora sticky-notes default
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch that replaces fpaste.org with fedora sticky notes
0001-replace-fpaste.org-with-sticky-notes-version-fpaste..patch (text/plain), 3.07 KB, created by
Ankur Sinha (FranciscoD)
on 2012-10-13 00:11:02 UTC
(
hide
)
Description:
Patch that replaces fpaste.org with fedora sticky notes
Filename:
MIME Type:
Creator:
Ankur Sinha (FranciscoD)
Created:
2012-10-13 00:11:02 UTC
Size:
3.07 KB
patch
obsolete
>From 319b7c0d8f3956e5a2d0e4d4a4cd40c5b18e386c Mon Sep 17 00:00:00 2001 >From: Clint Savage <herlo1@gmail.com> >Date: Fri, 12 Oct 2012 13:04:12 -0600 >Subject: [PATCH] replace fpaste.org with sticky-notes version fpaste.stg.fp.o > >--- > fpaste | 40 +++++++++++++++++++++++++--------------- > 1 file changed, 25 insertions(+), 15 deletions(-) > >diff --git a/fpaste b/fpaste >index 8899397..7073dcd 100755 >--- a/fpaste >+++ b/fpaste >@@ -19,9 +19,10 @@ > VERSION = '0.3.7.1' > USER_AGENT = 'fpaste/' + VERSION > SET_DESCRIPTION_IF_EMPTY = 1 # stdin, clipboard, sysinfo >-FPASTE_URL = 'http://fpaste.org/' >+#FPASTE_URL = 'http://fpaste.org/' >+FPASTE_URL = 'http://paste.stg.fedoraproject.org/' > >-import os, sys, urllib, urllib2, subprocess >+import os, sys, urllib, urllib2, subprocess, json > from optparse import OptionParser, OptionGroup, SUPPRESS_HELP > > def is_text(text, maxCheck = 100, pctPrintable = 0.75): >@@ -80,7 +81,7 @@ def paste(text, options): > if len(author) > 30: > author = author[0:30-3] + "..." > >- params = urllib.urlencode({'title': title, 'author': author, 'lexer': options.lang, 'content': text, 'expire_options': options.expires}) >+ params = urllib.urlencode({'paste_lang': options.lang, 'paste_data': text, 'api_submit': 'true', 'mode': 'json'}) > pasteSizeKiB = len(params)/1024.0 > > if pasteSizeKiB >= 512: # 512KiB appears to be the current hard limit (20110404); old limit was 16MiB >@@ -110,18 +111,27 @@ def paste(text, options): > print f.read() > return False > >- url = f.geturl() >- if re.match(FPASTE_URL + '?.+', url): >- return url >- elif urllib2.urlparse.urlsplit(url).path == '/static/limit/': >- # instead of returning a 500 server error, fpaste.org now returns "http://fedoraunity.org/static/limit/" if paste too large >- print >> sys.stderr, "Error: paste size (%.1fKiB) exceeded server limit. %s" % (pasteSizeKiB, url) >- return False >- else: >- print >> sys.stderr, "Invalid URL '%s' returned. This should not happen. Use --debug to see server output" % url >- if options.debug: >- print f.read() >- return False >+# response = f.read() >+ response = json.loads(f.read()) >+ id = [i[1]["id"] for i in response.iteritems()].pop() >+# for k,j in i.iteritems(): >+# print j, k >+ >+ url = "{0}{1}".format(FPASTE_URL, id) >+ return url >+ >+# url = f.geturl() >+# if re.match(FPASTE_URL + '?.+', url): >+# return url >+# elif urllib2.urlparse.urlsplit(url).path == '/static/limit/': >+# # instead of returning a 500 server error, fpaste.org now returns "http://fedoraunity.org/static/limit/" if paste too large >+# print >> sys.stderr, "Error: paste size (%.1fKiB) exceeded server limit. %s" % (pasteSizeKiB, url) >+# return False >+# else: >+# print >> sys.stderr, "Invalid URL '%s' returned. This should not happen. Use --debug to see server output" % url >+# if options.debug: >+# print f.read() >+# return False > > > def sysinfo(show_stderr = False, show_successful_cmds = True, show_failed_cmds = True): >-- >1.7.11.7 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 865971
: 626349