Permalink
Browse files

Implemented domainize function

  • Loading branch information...
1 parent 735aeb3 commit 2ae399a3a3a53f5303fa7b68bb2082866c83343d @sigsalerno sigsalerno committed Dec 19, 2012
@@ -1,12 +1,12 @@
from re import sub
-def domainize(self, name, *args, **kwargs)
+def domainize(name)
"""
Method who convert a string in a domain compatible name
"""
domainized_name = name.lower()
domainized_name = sub(r'[^a-z0-9]+', '_', dn).strip('_')
- return dn
+ return domainized_name
No changes.
@@ -1,14 +0,0 @@
-from re import sub
-
-class DnsImport:
-
- def domainize(self, name, *args, **kwargs)
- """
- Method who convert a string in a domain compatible name, just containing a-z and _
- """
- dn = name.lower()
- dn = sub(r'[^a-z0-9]+', '_', dn).strip('_')
-
- return dn
-
-
@@ -1,8 +0,0 @@
-from nodeshot.contrib import dns
-
-class dnsscript:
-
- def test(self):
- print 'hello,world'
-
- return True

0 comments on commit 2ae399a

Please sign in to comment.