Fix deprecated logging.warn() calls (bug 549322)

X-Gentoo-Bug: 549322
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=549322
Acked-by: Brian Dolbec <dolsen@gentoo.org>
diff --git a/bin/repoman b/bin/repoman
index 4763b39..b193ce5 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -282,10 +282,10 @@
 	if opts.mode == 'commit' and not (opts.force or opts.pretend):
 		if opts.ignore_masked:
 			opts.ignore_masked = False
-			logging.warn('Commit mode automatically disables --ignore-masked')
+			logging.warning('Commit mode automatically disables --ignore-masked')
 		if opts.without_mask:
 			opts.without_mask = False
-			logging.warn('Commit mode automatically disables --without-mask')
+			logging.warning('Commit mode automatically disables --without-mask')
 
 	return (opts, args)
 
@@ -435,7 +435,7 @@
 for x in missingvars:
 	x += ".missing"
 	if x not in qacats:
-		logging.warn('* missingvars values need to be added to qahelp ("%s")' % x)
+		logging.warning('* missingvars values need to be added to qahelp ("%s")' % x)
 		qacats.append(x)
 		qawarnings.add(x)
 
@@ -647,7 +647,7 @@
 	"'sign-manifests = false' in metadata/layout.conf.") % \
 	(repo_config.name,)
 	for line in textwrap.wrap(msg, 60):
-		logging.warn(line)
+		logging.warning(line)
 
 if sign_manifests and options.mode in ("commit",) and \
 	repoman_settings.get("PORTAGE_GPG_KEY") and \
@@ -2424,7 +2424,7 @@
 				(x, myflag))
 
 if options.if_modified == "y" and len(effective_scanlist) < 1:
-	logging.warn("--if-modified is enabled, but no modified packages were found!")
+	logging.warning("--if-modified is enabled, but no modified packages were found!")
 
 if options.mode == "manifest":
 	sys.exit(dofail)
diff --git a/pym/portage/_emirrordist/Config.py b/pym/portage/_emirrordist/Config.py
index db4bfeb..f884a49 100644
--- a/pym/portage/_emirrordist/Config.py
+++ b/pym/portage/_emirrordist/Config.py
@@ -79,8 +79,8 @@
 			line_format = "%s: %%s" % log_desc
 			add_newline = False
 			if log_path is not None:
-				logging.warn(("dry-run: %s log "
-					"redirected to logging.info") % log_desc)
+				logging.warning("dry-run: %s log "
+					"redirected to logging.info" % log_desc)
 		else:
 			self._open_files.append(io.open(log_path, mode=mode,
 				encoding='utf_8'))
@@ -114,7 +114,7 @@
 				db = ShelveUnicodeWrapper(db)
 
 		if self.options.dry_run:
-			logging.warn("dry-run: %s db opened in readonly mode" % db_desc)
+			logging.warning("dry-run: %s db opened in readonly mode" % db_desc)
 			if not isinstance(db, dict):
 				volatile_db = dict((k, db[k]) for k in db)
 				db.close()
diff --git a/pym/portage/_emirrordist/MirrorDistTask.py b/pym/portage/_emirrordist/MirrorDistTask.py
index 571caa5..e23a11b 100644
--- a/pym/portage/_emirrordist/MirrorDistTask.py
+++ b/pym/portage/_emirrordist/MirrorDistTask.py
@@ -166,8 +166,8 @@
 			date_files.append(filename)
 
 		if dry_run:
-			logging.warn(("dry-run: scheduled-deletions log "
-				"will be summarized via logging.info"))
+			logging.warning("dry-run: scheduled-deletions log "
+				"will be summarized via logging.info")
 
 		lines = []
 		for date in sorted(date_map):
diff --git a/pym/repoman/utilities.py b/pym/repoman/utilities.py
index a2535f0..b9594a7 100644
--- a/pym/repoman/utilities.py
+++ b/pym/repoman/utilities.py
@@ -276,16 +276,16 @@
 		# we only want 1 segment of the directory, is why we use catdir instead of startdir
 		catdir = reposplit[-2]
 		if catdir not in settings.categories:
-			logging.warn('%s is not a valid category according to profiles/categories, ' \
-				'skipping checks in %s' % (catdir, catdir))
+			logging.warning('%s is not a valid category according to '
+				'profiles/categories, skipping checks in %s' % (catdir, catdir))
 		else:
 			scanlist = AddPackagesInDir(catdir)
 	elif repolevel == 3: # pkgdir level, startdir = pkgdir
 		catdir = reposplit[-2]
 		pkgdir = reposplit[-1]
 		if catdir not in settings.categories:
-			logging.warn('%s is not a valid category according to profiles/categories, ' \
-			'skipping checks in %s' % (catdir, catdir))
+			logging.warning('%s is not a valid category according to '
+				'profiles/categories, skipping checks in %s' % (catdir, catdir))
 		else:
 			path = os.path.join(catdir, pkgdir)
 			logging.debug('adding %s to scanlist' % path)