diff --git a/_states/jenkins_theme.py b/_states/jenkins_theme.py
index 2f0208b..c27b0a2 100644
--- a/_states/jenkins_theme.py
+++ b/_states/jenkins_theme.py
@@ -2,26 +2,27 @@
 logger = logging.getLogger(__name__)
 
 set_theme_groovy = """\
-try{{
-    if(Class.forName("org.codefirst.SimpleThemeDecorator")){{
+try{
+    if(Class.forName("org.codefirst.SimpleThemeDecorator")){
         def state;
-        for (pd in PageDecorator.all()) {{
-          if (pd instanceof org.codefirst.SimpleThemeDecorator) {{
-            if(!pd.cssUrl.equals("{css_url}") || !pd.jsUrl.equals("{js_url}")){{
-                pd.cssUrl = "{css_url}"
-                pd.jsUrl = "{js_url}"
+        for (pd in PageDecorator.all()) {
+          if (pd instanceof org.codefirst.SimpleThemeDecorator) {
+            if(!pd.cssUrl.equals("${css_url}") || !pd.jsUrl.equals("${js_url}")){
+                pd.cssUrl = "${css_url}"
+                pd.jsUrl = "${js_url}"
                 state="SUCCESS"
-            }}else{{
+            }else{
                 state="EXISTS"
-            }}
-          }}
-        }}
+            }
+          }
+        }
         print(state)
-    }}
-}}catch(ClassNotFoundException e){{
+    }
+}catch(ClassNotFoundException e){
     print("Cannot user SimpleThemeDecorator, maybe Simple Theme Plugin not installed")
-}}
-""" # noqa
+}
+"""  # noqa
+
 
 def __virtual__():
     '''
@@ -59,17 +60,19 @@
     else:
         call_result = __salt__['jenkins_common.call_groovy_script'](
             set_theme_groovy, {"css_url": css_url, "js_url": js_url})
-        if call_result["code"] == 200 and call_result["msg"] in ["SUCCESS", "EXISTS"]:
+        if call_result["code"] == 200 and call_result["msg"] in [
+                "SUCCESS", "EXISTS"]:
             status = call_result["msg"]
             if status == "SUCCESS":
                 ret['changes'][name] = status
-            ret['comment'] = 'Jenkins theme config %s %s' % (name, status.lower())
+            ret['comment'] = 'Jenkins theme config %s %s' % (
+                name, status.lower())
             result = True
         else:
             status = 'FAILED'
             logger.error(
                 "Jenkins theme API call failure: %s", call_result["msg"])
             ret['comment'] = 'Jenkins theme API call failure: %s' % (call_result[
-                                                                           "msg"])
+                "msg"])
     ret['result'] = None if test else result
     return ret
