diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-04-03 08:26:27 +0200 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-04-03 08:26:27 +0200 |
commit | 329fa76fae015c8f7faee17dd498e8e87125477b (patch) | |
tree | 930deed285dbdbf0a5ec7cc4f3f512fb1b52cb76 /source/pyAggr3g470r.py | |
parent | Removed some useless regular expression. (diff) | |
download | newspipe-329fa76fae015c8f7faee17dd498e8e87125477b.tar.gz newspipe-329fa76fae015c8f7faee17dd498e8e87125477b.tar.bz2 newspipe-329fa76fae015c8f7faee17dd498e8e87125477b.zip |
THe code for the QR Code generation is now in utils.py.
Diffstat (limited to 'source/pyAggr3g470r.py')
-rwxr-xr-x | source/pyAggr3g470r.py | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py index 79181d68..282ec600 100755 --- a/source/pyAggr3g470r.py +++ b/source/pyAggr3g470r.py @@ -60,9 +60,6 @@ import export import mongodb import feedgetter import auth -#from qrcode.pyqrnative.PyQRNative import QRCode, QRErrorCorrectLevel, CodeOverflowException -#from qrcode import qr - def error_404(status, message, traceback, version): """ @@ -220,22 +217,9 @@ class pyAggr3g470r(object): description += "\n<br />\n" else: description = "<p>No description available.</p>\n<br />\n" - """ + # Generation of the QR Code for the current article - try: - os.makedirs("./var/qrcode/") - except OSError: - pass - if not os.path.isfile("./var/qrcode/" + article_id + ".png"): - # QR Code generation - try: - f = qr.QRUrl(url = article["article_link"]) - f.make() - except: - f = qr.QRUrl(url = "URL too long.") - f.make() - f.save("./var/qrcode/"+article_id+".png") - """ + utils.generate_qr_code(article) # Previous and following articles previous, following = None, None |