Merge simplestreams:warn-warning into simplestreams:master

Proposed by Dan Watkins
Status: Merged
Approved by: Dan Watkins
Approved revision: d17340178a744fb00177dd35b47e101077904e7e
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: simplestreams:warn-warning
Merge into: simplestreams:master
Diff against target: 71 lines (+8/-8)
4 files modified
simplestreams/mirrors/__init__.py (+2/-2)
simplestreams/mirrors/glance.py (+2/-2)
simplestreams/objectstores/__init__.py (+2/-2)
tools/ubuntu_versions.py (+2/-2)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Robert C Jennings (community) Approve
Review via email: mp+395508@code.launchpad.net

Commit message

simplestreams: fix use of deprecated LOG.warn method

To post a comment you must log in.
Revision history for this message
Robert C Jennings (rcj) wrote :

+1

review: Approve
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/simplestreams/mirrors/__init__.py b/simplestreams/mirrors/__init__.py
2index 60d5ade..4a9593a 100644
3--- a/simplestreams/mirrors/__init__.py
4+++ b/simplestreams/mirrors/__init__.py
5@@ -203,8 +203,8 @@ class UrlMirrorReader(MirrorReader):
6 csource.read(1024)
7 except Exception as e:
8 if isinstance(e, IOError) and (e.errno == errno.ENOENT):
9- LOG.warn("got ENOENT for (%s, %s), trying with trailing /",
10- self.prefix, path)
11+ LOG.warning("got ENOENT for (%s, %s), trying with trailing /",
12+ self.prefix, path)
13 self.prefix = self.prefix + '/'
14 else:
15 # this raised exception, but it was sneaky to do it
16diff --git a/simplestreams/mirrors/glance.py b/simplestreams/mirrors/glance.py
17index c3c5ab7..cd26c06 100644
18--- a/simplestreams/mirrors/glance.py
19+++ b/simplestreams/mirrors/glance.py
20@@ -215,7 +215,7 @@ class GlanceMirror(mirrors.BasicMirrorWriter):
21 continue
22
23 if image.get('status') != "active":
24- LOG.warn("Ignoring inactive image %s with status '%s'" % (
25+ LOG.warning("Ignoring inactive image %s with status '%s'" % (
26 image['id'], image.get('status')))
27 continue
28
29@@ -225,7 +225,7 @@ class GlanceMirror(mirrors.BasicMirrorWriter):
30 version = props.get('version_name')
31 item = props.get('item_name')
32 if not (version and product and item and source_content_id):
33- LOG.warn("%s missing required fields" % image['id'])
34+ LOG.warning("%s missing required fields" % image['id'])
35 continue
36
37 # get data from the datastore for this item, if it exists
38diff --git a/simplestreams/objectstores/__init__.py b/simplestreams/objectstores/__init__.py
39index 6ce8ff0..f118a92 100644
40--- a/simplestreams/objectstores/__init__.py
41+++ b/simplestreams/objectstores/__init__.py
42@@ -175,13 +175,13 @@ class FileStore(ObjectStore):
43 if not reader.check():
44 os.unlink(partfile)
45 if orig_part_size:
46- LOG.warn(resume_msg)
47+ LOG.warning(resume_msg)
48 raise checksum_util.invalid_checksum_for_reader(reader)
49 else:
50 if not cksum.check():
51 os.unlink(partfile)
52 if orig_part_size:
53- LOG.warn(resume_msg)
54+ LOG.warning(resume_msg)
55 raise checksum_util.InvalidChecksum(path=path, cksum=cksum)
56 os.rename(partfile, wpath)
57
58diff --git a/tools/ubuntu_versions.py b/tools/ubuntu_versions.py
59index cf9fd7f..4b896c6 100644
60--- a/tools/ubuntu_versions.py
61+++ b/tools/ubuntu_versions.py
62@@ -99,8 +99,8 @@ def get_ubuntu_info(date=None):
63 try:
64 devel = udi.devel(date=date)
65 except distro_info.DistroDataOutdated as e:
66- LOG.warn("distro_info.UbuntuDistroInfo() raised exception (%s)."
67- " Using stable release as devel.", e)
68+ LOG.warning("distro_info.UbuntuDistroInfo() raised exception (%s)."
69+ " Using stable release as devel.", e)
70 devel = udi.stable(date=date)
71 ret = []
72

Subscribers

People subscribed via source and target branches

to all changes: