From b5524d7f6a0ea5b01f058b67c17e5e07939af662 Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Tue, 14 Aug 2012 14:06:59 -0500 Subject: PY3K/PEP8 fixes Signed-off-by: Sol Jerome --- misc/bcfg2.spec | 2 +- src/lib/Bcfg2/Server/Plugins/Packages/Yum.py | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/misc/bcfg2.spec b/misc/bcfg2.spec index a86765398..d4d5c5f1c 100644 --- a/misc/bcfg2.spec +++ b/misc/bcfg2.spec @@ -1,4 +1,4 @@ -%define release 0.2 +%define release 0.1 %define __python python %{!?py_ver: %define py_ver %(%{__python} -c 'import sys;print(sys.version[0:3])')} %define pythonversion %{py_ver} diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py b/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py index ce1d9886f..24187d7a9 100644 --- a/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py +++ b/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py @@ -1,14 +1,11 @@ import os import re import sys -import time import copy -import glob import socket import logging -import threading import lxml.etree -from subprocess import Popen, PIPE, STDOUT +from subprocess import Popen, PIPE import Bcfg2.Server.Plugin from Bcfg2.Bcfg2Py3k import StringIO, cPickle, HTTPError, URLError, \ ConfigParser, file @@ -434,7 +431,7 @@ class YumCollection(Collection): default="auto")) if attrs['version'] == 'any': return attrs - + if pkgtup[1]: attrs['arch'] = pkgtup[1] if pkgtup[2]: @@ -621,7 +618,6 @@ class YumSource(Source): self.filemap, self.url_map), cache, 2) cache.close() - def load_state(self): if not self.use_yum: data = file(self.cachefile) @@ -636,7 +632,7 @@ class YumSource(Source): usettings = [{'version':self.version, 'component':comp, 'arch':arch} for comp in self.components] - else: # rawurl given + else: # rawurl given usettings = [{'version':self.version, 'component':None, 'arch':arch}] -- cgit v1.2.3-1-g7c22