[PATCH 2/3] Use a constant for the Datetime spoke initialization thread

Vratislav Podzimek vpodzime at redhat.com
Thu Jun 6 12:05:12 UTC 2013


We use constants for threads.

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 pyanaconda/constants.py                    | 1 +
 pyanaconda/ui/gui/spokes/datetime_spoke.py | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/constants.py b/pyanaconda/constants.py
index 10ce2ec..2307d8e 100644
--- a/pyanaconda/constants.py
+++ b/pyanaconda/constants.py
@@ -126,6 +126,7 @@ THREAD_FCOE = "AnaFCOEThread"
 THREAD_ISCSI_DISCOVER = "AnaIscsiDiscoverThread"
 THREAD_ISCSI_LOGIN = "AnaIscsiLoginThread"
 THREAD_GEOLOCATION_REFRESH = "AnaGeolocationRefreshThread"
+THREAD_DATE_TIME = "AnaDateTimeThread"
 
 # Geolocation constants
 
diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py
index dafdae0..093dcaa 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py
@@ -40,6 +40,7 @@ from pyanaconda import network
 from pyanaconda import nm
 from pyanaconda import ntp
 from pyanaconda import flags
+from pyanaconda import constants
 from pyanaconda.threads import threadMgr, AnacondaThread
 
 import datetime
@@ -339,7 +340,8 @@ class DatetimeSpoke(FirstbootSpokeMixIn, NormalSpoke):
 
         self._regions_zones = timezone.get_all_regions_and_timezones()
 
-        threadMgr.add(AnacondaThread(name="AnaDateTimeThread", target=self._initialize))
+        threadMgr.add(AnacondaThread(name=constants.THREAD_DATE_TIME,
+                                     target=self._initialize))
 
     def _initialize(self):
         for day in xrange(1, 32):
-- 
1.7.11.7



More information about the anaconda-patches mailing list