diff options
author | Colin Walters <walters@verbum.org> | 2010-10-08 11:49:28 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-10-08 11:49:28 -0400 |
commit | 699c9f8332dcf1eef8ae626716d5cda3f9f5bc88 (patch) | |
tree | 3e34850fa68a32aa600a81e79c107fb275eaac14 | |
parent | 84e5bb7d1fad8c22ffcf9885900787c0127a4930 (diff) | |
download | rpmci-699c9f8332dcf1eef8ae626716d5cda3f9f5bc88.tar.gz rpmci-699c9f8332dcf1eef8ae626716d5cda3f9f5bc88.tar.xz rpmci-699c9f8332dcf1eef8ae626716d5cda3f9f5bc88.zip |
Only use glib.threads_init if available.
-rw-r--r-- | rpmci/rpmci_binrpm_builder_main.py | 3 | ||||
-rw-r--r-- | rpmci/rpmci_inject_rebuild_main.py | 3 | ||||
-rw-r--r-- | rpmci/rpmci_spec_vcs_main.py | 3 | ||||
-rw-r--r-- | rpmci/rpmci_srpm_builder_main.py | 3 | ||||
-rw-r--r-- | rpmci/rpmci_update_config_main.py | 3 | ||||
-rw-r--r-- | rpmci/rpmci_vcs_mirror_main.py | 3 |
6 files changed, 12 insertions, 6 deletions
diff --git a/rpmci/rpmci_binrpm_builder_main.py b/rpmci/rpmci_binrpm_builder_main.py index 86ddf5d..23ed99c 100644 --- a/rpmci/rpmci_binrpm_builder_main.py +++ b/rpmci/rpmci_binrpm_builder_main.py @@ -126,7 +126,8 @@ class BinRPMBuilder(object): subtask.spawn_sync(taskid, args) def main(): - glib.threads_init() + if hasattr('glib', 'threads_init'): + glib.threads_init() opts = optparse.OptionParser("usage: %prog [options]") opts.add_option('-c', '--config', dest='config', help="Path to configuration file") diff --git a/rpmci/rpmci_inject_rebuild_main.py b/rpmci/rpmci_inject_rebuild_main.py index eb1373f..5349be6 100644 --- a/rpmci/rpmci_inject_rebuild_main.py +++ b/rpmci/rpmci_inject_rebuild_main.py @@ -42,7 +42,8 @@ def inject_rebuild(options, config, module): print "Wrote %s" % (msg.ident, ) def main(): - glib.threads_init() + if hasattr('glib', 'threads_init'): + glib.threads_init() opts = optparse.OptionParser("usage: %prog [options] ACTION [args]") opts.add_option('-c', '--config', dest='config', help="Path to configuration file") diff --git a/rpmci/rpmci_spec_vcs_main.py b/rpmci/rpmci_spec_vcs_main.py index c444e35..903a221 100644 --- a/rpmci/rpmci_spec_vcs_main.py +++ b/rpmci/rpmci_spec_vcs_main.py @@ -61,7 +61,8 @@ def set_revision(options, args): spec_obj.save() def main(): - glib.threads_init() + if hasattr('glib', 'threads_init'): + glib.threads_init() opts = optparse.OptionParser("usage: %prog [options] ACTION [args]") opts.add_option('', '--debug', action='store_true', help="Print verbose debugging") diff --git a/rpmci/rpmci_srpm_builder_main.py b/rpmci/rpmci_srpm_builder_main.py index 47fe0ba..724bfbd 100644 --- a/rpmci/rpmci_srpm_builder_main.py +++ b/rpmci/rpmci_srpm_builder_main.py @@ -196,7 +196,8 @@ class SRPMBuilder(object): return srpm_path def main(): - glib.threads_init() + if hasattr('glib', 'threads_init'): + glib.threads_init() opts = optparse.OptionParser("usage: %prog [options]") opts.add_option('-c', '--config', dest='config', help="Path to configuration file") diff --git a/rpmci/rpmci_update_config_main.py b/rpmci/rpmci_update_config_main.py index d7b2265..4e4a365 100644 --- a/rpmci/rpmci_update_config_main.py +++ b/rpmci/rpmci_update_config_main.py @@ -71,7 +71,8 @@ def update_config(options, config): _run_vcsmirror(options, config) def main(): - glib.threads_init() + if hasattr('glib', 'threads_init'): + glib.threads_init() opts = optparse.OptionParser("usage: %prog [options]") opts.add_option('-c', '--config', dest='config', help="Path to configuration file") diff --git a/rpmci/rpmci_vcs_mirror_main.py b/rpmci/rpmci_vcs_mirror_main.py index db24e58..7d1a85a 100644 --- a/rpmci/rpmci_vcs_mirror_main.py +++ b/rpmci/rpmci_vcs_mirror_main.py @@ -229,7 +229,8 @@ class VCSMirror(object): def main(): - glib.threads_init() + if hasattr('glib', 'threads_init'): + glib.threads_init() opts = optparse.OptionParser("usage: %prog [options]") opts.add_option('-c', '--config', dest='config', help="Path to configuration file") |