summaryrefslogtreecommitdiff
path: root/cloudinit/handlers/upstart_job.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2013-07-21 09:26:44 -0700
committerJoshua Harlow <harlowja@gmail.com>2013-07-21 09:26:44 -0700
commit7022512f3ceb955be2834844f05d4683f78ff276 (patch)
tree221822e3510d36c2e1ebbab142394b5bfe241ce2 /cloudinit/handlers/upstart_job.py
parent1edfb2a7a36a2bdddfe0ca48ba5d23721bf17a35 (diff)
downloadvyos-cloud-init-7022512f3ceb955be2834844f05d4683f78ff276.tar.gz
vyos-cloud-init-7022512f3ceb955be2834844f05d4683f78ff276.zip
Use constants for repeated type strings.
Diffstat (limited to 'cloudinit/handlers/upstart_job.py')
-rw-r--r--cloudinit/handlers/upstart_job.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/handlers/upstart_job.py b/cloudinit/handlers/upstart_job.py
index 7a73d1b2..bac4cad2 100644
--- a/cloudinit/handlers/upstart_job.py
+++ b/cloudinit/handlers/upstart_job.py
@@ -31,6 +31,7 @@ from cloudinit import util
from cloudinit.settings import (PER_INSTANCE)
LOG = logging.getLogger(__name__)
+UPSTART_PREFIX = "#upstart-job"
class UpstartJobPartHandler(handlers.Handler):
@@ -40,7 +41,7 @@ class UpstartJobPartHandler(handlers.Handler):
def list_types(self):
return [
- handlers.type_from_starts_with("#upstart-job"),
+ handlers.type_from_starts_with(UPSTART_PREFIX),
]
def handle_part(self, _data, ctype, filename, # pylint: disable=W0221