← Back to team overview

mlhim-specs-dev team mailing list archive

[Branch ~cdd-dev/cdd/trunk] Rev 208: Improved the name of the ccd to have a new uuid every time a ccd is generated.

 

------------------------------------------------------------
revno: 208
committer: Eduardo C. P. Ribeiro <eduardo.cesar@xxxxxxx>
branch nick: cdd
timestamp: Wed 2012-08-01 22:34:09 -0300
message:
  Improved the name of the ccd to have a new uuid every time a ccd is generated.
modified:
  src/cdd.py
  src/cdg_main.py


--
lp:cdd
https://code.launchpad.net/~cdd-dev/cdd/trunk

Your team MLHIM Specifications Developers is subscribed to branch lp:cdd.
To unsubscribe from this branch go to https://code.launchpad.net/~cdd-dev/cdd/trunk/+edit-subscription
=== modified file 'src/cdd.py'
--- src/cdd.py	2012-08-02 01:14:20 +0000
+++ src/cdd.py	2012-08-02 01:34:09 +0000
@@ -350,7 +350,7 @@
         path = cdg_main.get_path(self)
         if not path:
             return
-
+        info.randomize_uuid()
         info.generate_file(path)
         # Show dialog
         cdg_main.popup_message(self, '%s.xsd' % info.ccd_id, _('Generated the file'), wx.OK | wx.ICON_INFORMATION)

=== modified file 'src/cdg_main.py'
--- src/cdg_main.py	2012-08-02 01:14:20 +0000
+++ src/cdg_main.py	2012-08-02 01:34:09 +0000
@@ -536,6 +536,8 @@
 
         f.close()
 
+    def randomize_uuid(self):
+        self.ccd_id = "ccd_"+str(uuid.uuid4()).replace('-','_')
 
     # Gets info from the metadata panel. Depends on class metadata specifics
     def get_meta_info(self, panel):