Code Duplication    Length = 10-10 lines in 2 locations

savu/tomo_recon.py 1 location

@@ 200-209 (lines=10) @@
197
    return options
198
199
200
def __create_folder_name(dpath):
201
    if os.path.isfile(dpath):
202
        dpath = os.path.splitext(dpath)[0]
203
    elif os.path.isdir(dpath):
204
        dpath = os.path.dirname(dpath)
205
    import time
206
    MPI.COMM_WORLD.barrier()
207
    timestamp = time.strftime("%Y%m%d%H%M%S")
208
    MPI.COMM_WORLD.barrier()
209
    return "_".join([timestamp, os.path.basename(dpath)])
210
211
212
def __create_output_folder(path, folder_name):

savu/pre_run.py 1 location

@@ 169-178 (lines=10) @@
166
167
    return options
168
169
def __create_folder_name(dpath):
170
    if os.path.isfile(dpath):
171
        dpath = os.path.splitext(dpath)[0]
172
    elif os.path.isdir(dpath):
173
        dpath = os.path.dirname(dpath)
174
    import time
175
    MPI.COMM_WORLD.barrier()
176
    timestamp = time.strftime("%Y%m%d%H%M%S")
177
    MPI.COMM_WORLD.barrier()
178
    return "_".join([timestamp, os.path.basename(dpath)])
179
180
181
def __create_output_folder(path, folder_name):