fix StringType and itervalues in plugin and cli
This commit is contained in:
parent
9d812166ac
commit
e64c57e866
2 changed files with 3 additions and 2 deletions
2
cli/koji
2
cli/koji
|
|
@ -51,7 +51,7 @@ def register_plugin(plugin):
|
|||
|
||||
Handlers are functions marked with one of the decorators defined in koji.plugin
|
||||
"""
|
||||
for v in vars(plugin).itervalues():
|
||||
for v in six.itervalues(vars(plugin)):
|
||||
if isinstance(v, (types.ClassType, types.TypeType)):
|
||||
#skip classes
|
||||
continue
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import koji
|
|||
import logging
|
||||
import sys
|
||||
import traceback
|
||||
import six
|
||||
|
||||
# the available callback hooks and a list
|
||||
# of functions to be called for each event
|
||||
|
|
@ -91,7 +92,7 @@ class PluginTracker(object):
|
|||
return self.plugins.get(name)
|
||||
|
||||
def pathlist(self, path):
|
||||
if isinstance(path, basestring):
|
||||
if isinstance(path, six.string_types):
|
||||
return [path]
|
||||
else:
|
||||
return path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue