[Frugalware-git] frugal-tweak: pyfpm *screenshot added 404 test error (debian and frugalware don't have the same package name)

bouleetbil bouleetbil at frogdev.info
Tue Jan 10 15:54:10 CET 2012


Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugal-tweak.git;a=commitdiff;h=96e42b4f96c3c36b8666e79771946ff8098ba1c1

commit 96e42b4f96c3c36b8666e79771946ff8098ba1c1
Author: bouleetbil <bouleetbil at frogdev.info>
Date:   Tue Jan 10 15:44:00 2012 +0100

pyfpm
*screenshot added 404 test error (debian and frugalware don't have the same package name)

diff --git a/py-pacman/pyfpm/src/pyfpm.py b/py-pacman/pyfpm/src/pyfpm.py
index 6b7cb8c..89934bd 100755
--- a/py-pacman/pyfpm/src/pyfpm.py
+++ b/py-pacman/pyfpm/src/pyfpm.py
@@ -177,11 +177,12 @@ class GUI:
filename="/tmp/"+pkgname
self.download("http://screenshots.debian.net/package/"+pkgname,"/tmp/pyfpm")
str_not="There are no (approved) screenshots for this package yet."
+				str_404="Error 404"
file = open("/tmp/pyfpm", "r")
text = 	file.read()
file.close()
bo_ok=1
-				if text.find(str_not)>0:
+				if text.find(str_not)>0 or text.find(str_404)>0:
bo_ok=0
self.download("http://screenshots.debian.net/thumbnail/"+pkgname,filename)
imgscreenshot=self.builder.get_object("imgscreenshot")


More information about the Frugalware-git mailing list