fix 'make pylint' warnings
On my system (quantal) this 'make pylint' does not complain now.
This commit is contained in:
parent
86d657e66e
commit
aa085c1645
@ -98,7 +98,8 @@ class DataSourceEc2(sources.DataSource):
|
|||||||
if not availability_zone:
|
if not availability_zone:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
mirror_tpl = self.distro.get_option('package_mirror_ec2_template', None)
|
mirror_tpl = self.distro.get_option('package_mirror_ec2_template',
|
||||||
|
None)
|
||||||
|
|
||||||
if mirror_tpl is None:
|
if mirror_tpl is None:
|
||||||
return None
|
return None
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# pylint: disable=C0302
|
||||||
|
|
||||||
from StringIO import StringIO
|
from StringIO import StringIO
|
||||||
|
|
||||||
@ -936,8 +938,8 @@ def chownbyname(fname, user=None, group=None):
|
|||||||
if group:
|
if group:
|
||||||
gid = grp.getgrnam(group).gr_gid
|
gid = grp.getgrnam(group).gr_gid
|
||||||
except KeyError:
|
except KeyError:
|
||||||
logexc(LOG, ("Failed changing the ownership of %s using username %s and"
|
logexc(LOG, ("Failed changing the ownership of %s using username %s "
|
||||||
" groupname %s (do they exist?)"), fname, user, group)
|
"and groupname %s (do they exist?)"), fname, user, group)
|
||||||
return False
|
return False
|
||||||
chownbyid(fname, uid, gid)
|
chownbyid(fname, uid, gid)
|
||||||
return True
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user