SF.net SVN: gar:[23109] csw/mgar/gar/v2/lib/python/rest.py
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Sun Mar 2 18:52:40 CET 2014
Revision: 23109
http://sourceforge.net/p/gar/code/23109
Author: wahwah
Date: 2014-03-02 17:52:39 +0000 (Sun, 02 Mar 2014)
Log Message:
-----------
rest.py: Remove a spammy message from warning lev
This error is now commonly occurring in multiple scripts, no need to show it
to users.
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/rest.py
Modified: csw/mgar/gar/v2/lib/python/rest.py
===================================================================
--- csw/mgar/gar/v2/lib/python/rest.py 2014-03-02 17:52:32 UTC (rev 23108)
+++ csw/mgar/gar/v2/lib/python/rest.py 2014-03-02 17:52:39 UTC (rev 23109)
@@ -530,8 +530,8 @@
try:
with open(authfile, 'r') as af:
password = af.read().strip()
- except IOError, e:
- logging.warning("Error reading %s: %s", authfile, e)
+ except IOError as e:
+ logging.debug("Error reading %s: %s", authfile, e)
if password is None:
# This part is specific to OpenCSW buildfarm.
@@ -539,8 +539,13 @@
ret_code, stdout, stderr = shell.ShellCommand(args)
if not ret_code:
password = stdout.strip()
+ else:
+ logging.debug('Failed running %r', args)
if password is None:
+ logging.warning(
+ 'Could not find password for user %r. '
+ 'Falling back to getpass.getpass().', username)
password = getpass.getpass("{0}'s pkg release password> ".format(username))
return username, password
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list