Permalink
Browse files

improved dns script file

  • Loading branch information...
1 parent d42c3e6 commit 735aeb36cd1c0b6332162cf223fb94b857276f1d @sigsalerno sigsalerno committed Dec 19, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 nodeshot/contrib/dns/script.py
@@ -0,0 +1,12 @@
+from re import sub
+
+def domainize(self, name, *args, **kwargs)
+"""
+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
+
+

0 comments on commit 735aeb3

Please sign in to comment.