@@ -94,19 +94,34 | |||||
94 | #------------------------------------------------- Crea directorios en la ruta indicada ----------------------------------------------------------- No newline at end of file |
|
94 | #------------------------------------------------- Crea directorios en la ruta indicada ----------------------------------------------------------- | |
95 | No newline at end of file |
|
95 | ||
96 | def make_dirs(list_dirs, self): |
|
96 | def make_dirs(list_dirs, self): | |
No newline at end of file |
|
||||
97 | """ |
|
|||
No newline at end of file |
|
||||
98 |
|
||||
No newline at end of file |
|
||||
99 | """ No newline at end of file |
|
|||
100 | No newline at end of file |
|
97 | ||
101 | for var_dir in list_dirs: No newline at end of file |
|
98 | for var_dir in list_dirs: | |
102 | shutil.rmtree(self.var_Rpath+'/'+var_dir, True) |
|
99 | shutil.rmtree(self.var_Rpath+'/'+var_dir, True) | |
No newline at end of file |
|
100 | var_output=commands.getstatusoutput("mkdir -p "+self.var_Rpath+'/'+var_dir) | ||
103 | var_output=commands.getstatusoutput("mkdir -p "+self.var_Rpath+'/'+var_dir)[0] |
|
No newline at end of file | ||
No newline at end of file |
|
101 | if var_output[0] != 0: | ||
104 | if var_output != 0: |
|
No newline at end of file | ||
No newline at end of file |
|
102 | self.txtInfo.append("Error creating directory: "+var_dir+", output_error:" + str(var_output[0])) No newline at end of file | ||
105 | self.txtInfo.append("Error creating directory: "+var_dir+", output_error:" + str(var_output)) No newline at end of file |
|
|||
106 | return False No newline at end of file |
|
103 | return False | |
107 | self.txtInfo.append('Directories created correctly') No newline at end of file |
|
104 | self.txtInfo.append('Directories created correctly') | |
108 | return True No newline at end of file |
|
105 | return True | |
109 | No newline at end of file |
|
106 | ||
|
107 | def remove_dir(var_dir, self): | |||
|
No newline at end of file | ||||
|
108 | var_output = commands.getstatusoutput('chmod -R 777 '+var_dir) | |||
|
No newline at end of file | ||||
|
109 | if var_output[0] != 0: | |||
|
No newline at end of file | ||||
|
110 | self.txtInfo.append("Error changing permissions: "+var_dir+", output_error:" + str(var_output[0])) | |||
|
No newline at end of file | ||||
|
111 | return False | |||
|
No newline at end of file | ||||
|
112 | ||||
|
No newline at end of file | ||||
|
113 | var_output = commands.getstatusoutput('rm -rf '+var_dir) | |||
|
No newline at end of file | ||||
|
114 | if var_output[0] != 0: | |||
|
No newline at end of file | ||||
|
115 | self.txtInfo.append("Error deleting directory: "+var_dir+", output_error:" + str(var_output[0])) | |||
|
No newline at end of file | ||||
|
116 | return False | |||
|
No newline at end of file | ||||
|
117 | return True | |||
|
No newline at end of file | ||||
|
118 | ||||
|
No newline at end of file | ||||
|
119 | def make_dir(var_dir, self): | |||
|
No newline at end of file | ||||
|
120 | var_output = commands.getstatusoutput('mkdir '+var_dir) | |||
|
No newline at end of file | ||||
|
121 | if var_output[0] != 0: | |||
|
No newline at end of file | ||||
|
122 | self.txtInfo.append("Error deleting directory: "+var_dir+", output_error:" + str(var_output[0])) | |||
|
No newline at end of file | ||||
|
123 | return False | |||
|
No newline at end of file | ||||
|
124 | return True No newline at end of file | |||
110 | No newline at end of file |
|
125 | ||
111 | #-------------------------------------------- Busca los archivos con los parametros de busqueda --------------------------------------- No newline at end of file |
|
126 | #-------------------------------------------- Busca los archivos con los parametros de busqueda --------------------------------------- | |
112 | No newline at end of file |
|
127 |
@@ -56,6 +56,31 | |||||
56 | var_cmd = 'eject ' + var_dev No newline at end of file |
|
56 | var_cmd = 'eject ' + var_dev | |
57 | commands.getstatusoutput(var_cmd) No newline at end of file |
|
57 | commands.getstatusoutput(var_cmd) | |
58 | No newline at end of file |
|
58 | ||
|
59 | #Expulsa el dispositivo de grabacion actual | |||
|
No newline at end of file | ||||
|
60 | def eject_one_device(self): | |||
|
No newline at end of file | ||||
|
61 | var_index = ( ( (self.var_disc_n - 1) * self.var_Copys) + (self.var_copy_n - 1) - self.var_burned_discs ) % len(self.var_devices) | |||
|
No newline at end of file | ||||
|
62 | var_dev = self.var_devices[var_index] | |||
|
No newline at end of file | ||||
|
63 | var_cmd = 'eject ' + var_dev | |||
|
No newline at end of file | ||||
|
64 | commands.getstatusoutput(var_cmd) | |||
|
No newline at end of file | ||||
|
65 | ||||
|
No newline at end of file | ||||
|
66 | def eject_t_one_device(self): | |||
|
No newline at end of file | ||||
|
67 | var_index = ( ( (self.var_disc_n - 1) * self.var_Copys) + (self.var_copy_n - 1) - self.var_burned_discs ) % len(self.var_devices) | |||
|
No newline at end of file | ||||
|
68 | var_dev = self.var_devices[var_index] | |||
|
No newline at end of file | ||||
|
69 | var_cmd = 'eject -t ' + var_dev | |||
|
No newline at end of file | ||||
|
70 | commands.getstatusoutput(var_cmd) | |||
|
No newline at end of file | ||||
|
71 | ||||
|
No newline at end of file | ||||
|
72 | def get_dev_sr(self): | |||
|
No newline at end of file | ||||
|
73 | var_index = ( ( (self.var_disc_n - 1) * self.var_Copys) + (self.var_copy_n - 1) - self.var_burned_discs ) % len(self.var_devices) | |||
|
No newline at end of file | ||||
|
74 | var_dev = self.var_devices[var_index] | |||
|
No newline at end of file | ||||
|
75 | var_output=commands.getstatusoutput('ls -lh '+var_dev) | |||
|
No newline at end of file | ||||
|
76 | if var_output[0] != 0: | |||
|
No newline at end of file | ||||
|
77 | return "FATAL ERROR" | |||
|
No newline at end of file | ||||
|
78 | else: | |||
|
No newline at end of file | ||||
|
79 | var_dev_sr = "/dev/"+var_output[1] .split()[-1] | |||
|
No newline at end of file | ||||
|
80 | return var_dev_sr | |||
|
No newline at end of file | ||||
|
81 | ||||
|
No newline at end of file | ||||
|
82 | ||||
|
No newline at end of file | ||||
|
83 | No newline at end of file | |||
59 | #----------------------------------- listado de los dispositivos de grabacion seleccionados -------------------------------------------- No newline at end of file |
|
84 | #----------------------------------- listado de los dispositivos de grabacion seleccionados -------------------------------------------- | |
60 | No newline at end of file |
|
85 | ||
61 | def selected_devices(self): No newline at end of file |
|
86 | def selected_devices(self): |
@@ -32,10 +32,9 | |||||
32 | No newline at end of file |
|
32 | ||
33 | def setupUi2(self): No newline at end of file |
|
33 | def setupUi2(self): | |
34 |
|
34 | |||
No newline at end of file |
|
35 | self.txtInfo.append("cambio 1") | ||
35 | self.txtInfo.append("cambio") |
|
No newline at end of file | ||
No newline at end of file |
|
36 | |||
36 |
|
No newline at end of file | |||
No newline at end of file |
|
37 | self.allTrue = False No newline at end of file | ||
37 |
|
||||
No newline at end of file |
|
||||
38 | self.allTrue = True No newline at end of file |
|
|||
39 | No newline at end of file |
|
38 | ||
40 | if self.allTrue == True: No newline at end of file |
|
39 | if self.allTrue == True: | |
41 | self.var_real_principal = True No newline at end of file |
|
40 | self.var_real_principal = True |
@@ -1002,6 +1002,9 | |||||
1002 | <widget class="QLineEdit" name="txtTDpath"> No newline at end of file |
|
1002 | <widget class="QLineEdit" name="txtTDpath"> | |
1003 | <property name="enabled"> No newline at end of file |
|
1003 | <property name="enabled"> | |
1004 | <bool>false</bool> No newline at end of file |
|
1004 | <bool>false</bool> | |
|
1005 | </property> | |||
|
No newline at end of file | ||||
|
1006 | <property name="readOnly"> | |||
|
No newline at end of file | ||||
|
1007 | <bool>true</bool> No newline at end of file | |||
1005 | </property> No newline at end of file |
|
1008 | </property> | |
1006 | </widget> No newline at end of file |
|
1009 | </widget> | |
1007 | </item> No newline at end of file |
|
1010 | </item> |
General Comments 0
You need to be logged in to leave comments.
Login now