src/eric7/MicroPython/MicroPythonFileManagerWidget.py

branch
eric7
changeset 9959
8ca27cc20953
parent 9905
189b7a23c3c6
child 10143
bf84513859ca
equal deleted inserted replaced
9958:a78b83d1062a 9959:8ca27cc20953
1141 @param fsinfo tuple of tuples containing the file system name, the 1141 @param fsinfo tuple of tuples containing the file system name, the
1142 total size, the used size and the free size 1142 total size, the used size and the free size
1143 @type tuple of tuples of (str, int, int, int) 1143 @type tuple of tuples of (str, int, int, int)
1144 """ 1144 """
1145 msg = self.tr("<h3>Filesystem Information</h3>") 1145 msg = self.tr("<h3>Filesystem Information</h3>")
1146 for name, totalSize, usedSize, freeSize in fsinfo: 1146 if fsinfo:
1147 for name, totalSize, usedSize, freeSize in fsinfo:
1148 msg += self.tr(
1149 "<h4>{0}</h4"
1150 "<table>"
1151 "<tr><td>Total Size: </td><td align='right'>{1}</td></tr>"
1152 "<tr><td>Used Size: </td><td align='right'>{2}</td></tr>"
1153 "<tr><td>Free Size: </td><td align='right'>{3}</td></tr>"
1154 "</table>"
1155 ).format(
1156 name,
1157 Globals.dataString(totalSize),
1158 Globals.dataString(usedSize),
1159 Globals.dataString(freeSize),
1160 )
1161 else:
1147 msg += self.tr( 1162 msg += self.tr(
1148 "<h4>{0}</h4" 1163 "<p>No file systems or file system information available.</p>"
1149 "<table>"
1150 "<tr><td>Total Size: </td><td align='right'>{1}</td></tr>"
1151 "<tr><td>Used Size: </td><td align='right'>{2}</td></tr>"
1152 "<tr><td>Free Size: </td><td align='right'>{3}</td></tr>"
1153 "</table>"
1154 ).format(
1155 name,
1156 Globals.dataString(totalSize),
1157 Globals.dataString(usedSize),
1158 Globals.dataString(freeSize),
1159 ) 1164 )
1160 EricMessageBox.information(self, self.tr("Filesystem Information"), msg) 1165 EricMessageBox.information(self, self.tr("Filesystem Information"), msg)

eric ide

mercurial