/stdhome

To get this branch, use:
bzr branch http://bzr.ed.am/stdhome

« back to all changes in this revision

Viewing changes to lib/stdhome/deployment.py

  • Committer: Tim Marston
  • Date: 2014-04-18 14:47:58 UTC
  • Revision ID: tim@ed.am-20140418144758-78lktgncp0j5wxfu
added add command

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
                        return
68
68
 
69
69
                # read the file list
70
 
                if the.verbose: print "deployment state found; loading"
 
70
                if the.verbose >= 1: print "deployment state found; loading"
71
71
                f = open( file, 'r' )
72
72
                state = json.loads( f.read() )
73
73
 
81
81
                """Save the current deployment state (so there will be a deployment ongoing).
82
82
                """
83
83
 
84
 
                if the.verbose: print "saving deployment state"
 
84
                if the.verbose >= 1: print "saving deployment state"
85
85
 
86
86
                # create metadata directory, as necessary
87
87
                if not os.path.isdir( the.full_mddir ):
109
109
                if( os.path.isfile( file ) ):
110
110
 
111
111
                        # delete it
112
 
                        if the.verbose: print "removing deployment state"
 
112
                        if the.verbose >= 1: print "removing deployment state"
113
113
                        os.unlink( file )
114
114
 
115
115
 
153
153
                        self.imported_files = list()
154
154
                else:
155
155
                        # copy in
156
 
                        if the.verbose: print "importing files..."
 
156
                        if the.verbose >= 1: print "importing files..."
157
157
                        walker = CopyInWalker()
158
158
                        walker.walk()
159
159
                        self.imported_files = walker.walk_list
202
202
                        raise RuntimeError('logic error: deployment conflicts unchecked' )
203
203
 
204
204
                # copy out
205
 
                if the.verbose: print "exporting files..."
 
205
                if the.verbose >= 1: print "exporting files..."
206
206
                walker = CopyOutWalker( self.affected_files )
207
207
                walker.walk()
208
208