[opensuse-buildservice] [PATCH 1/3] fix close() statement in download()
From 257d823c45b940604c8d3d992b1e1f2da3746074 Mon Sep 17 00:00:00 2001 From: Danny Kukawka <danny.kukawka@web.de> Date: Fri, 30 Apr 2010 17:17:17 +0200 Subject: [PATCH] fix close() statement in download() Fixed warning from pychecker by fixing the close() statement in download(). Signed-off-by: Danny Kukawka <danny.kukawka@web.de> --- osc/commandline.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/osc/commandline.py b/osc/commandline.py index 057edc5..a8e5d2c 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -4663,7 +4663,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. u = makeurl(dir['apiurl'], ['source', dir['project'], dir['package'], pathname2url(name)], query=query) for buf in streamfile(u, http_GET, BUFSIZE): o.write(buf) - o.close + o.close() @cmdln.option('-d', '--destdir', default='repairlink', metavar='DIR', -- 1.5.6 -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
From 1f9b748c733624e86777173a3fff399d622073b8 Mon Sep 17 00:00:00 2001 From: Danny Kukawka <danny.kukawka@web.de> Date: Fri, 30 Apr 2010 17:24:04 +0200 Subject: [PATCH] fix some more close() statements Fixed warning from pychecker by fixing some close() statements. Signed-off-by: Danny Kukawka <danny.kukawka@web.de> --- osc/core.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osc/core.py b/osc/core.py index f0f86b6..302db5b 100644 --- a/osc/core.py +++ b/osc/core.py @@ -2038,10 +2038,10 @@ def init_package_dir(apiurl, project, package, dir, revision=None, files=True, l os.chdir(store) f = open('_project', 'w') f.write(project + '\n') - f.close + f.close() f = open('_package', 'w') f.write(package + '\n') - f.close + f.close() if limit_size: f = open('_size_limit', 'w') -- 1.5.6 -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
From 208250448c5d438f3906879993013ee126152ce2 Mon Sep 17 00:00:00 2001 From: Danny Kukawka <danny.kukawka@web.de> Date: Fri, 30 Apr 2010 17:45:41 +0200 Subject: [PATCH] fixed warning from pychecker Fixed warning from pychecker: 'Comparisons with True are not necessary and may not work as expected' Signed-off-by: Danny Kukawka <danny.kukawka@web.de> --- osc/core.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/osc/core.py b/osc/core.py index 302db5b..edac283 100644 --- a/osc/core.py +++ b/osc/core.py @@ -2243,7 +2243,7 @@ class metafile: def sync(self): hash = dgst(self.filename) - if self.change_is_required == True and hash == self.hash_orig: + if self.change_is_required and hash == self.hash_orig: print 'File unchanged. Not saving.' os.unlink(self.filename) return -- 1.5.6 -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 2010-05-03 16:10:15 +0200, Danny Kukawka wrote:
From 208250448c5d438f3906879993013ee126152ce2 Mon Sep 17 00:00:00 2001 From: Danny Kukawka <danny.kukawka@web.de> Date: Fri, 30 Apr 2010 17:45:41 +0200 Subject: [PATCH] fixed warning from pychecker
Fixed warning from pychecker: 'Comparisons with True are not necessary and may not work as expected'
I just committed your last 3 patches to git master. Thanks! Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (2)
-
Danny Kukawka
-
Marcus Hüwe