From 2970f6158daa8783302ce7005fe5b30d3b93d39e Mon Sep 17 00:00:00 2001 From: hut Date: Sat, 22 Oct 2011 04:53:58 +0200 Subject: ext.human_readable: Fixed spelling error (seperator->separator) --- ranger/ext/human_readable.py | 24 ++++++++++++------------ ranger/fsobject/directory.py | 2 +- ranger/gui/widgets/statusbar.py | 8 ++++---- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/ranger/ext/human_readable.py b/ranger/ext/human_readable.py index 9cdce409..c5bd2aac 100644 --- a/ranger/ext/human_readable.py +++ b/ranger/ext/human_readable.py @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -def human_readable(byte, seperator=' '): +def human_readable(byte, separator=' '): """ Convert a large number of bytes to an easily readable format. @@ -27,27 +27,27 @@ def human_readable(byte, seperator=' '): if byte <= 0: return '0' if byte < 2**10: - return '%d%sB' % (byte, seperator) + return '%d%sB' % (byte, separator) if byte < 2**10 * 999: - return '%.3g%sK' % (byte / 2**10.0, seperator) + return '%.3g%sK' % (byte / 2**10.0, separator) if byte < 2**20: - return '%.4g%sK' % (byte / 2**10.0, seperator) + return '%.4g%sK' % (byte / 2**10.0, separator) if byte < 2**20 * 999: - return '%.3g%sM' % (byte / 2**20.0, seperator) + return '%.3g%sM' % (byte / 2**20.0, separator) if byte < 2**30: - return '%.4g%sM' % (byte / 2**20.0, seperator) + return '%.4g%sM' % (byte / 2**20.0, separator) if byte < 2**30 * 999: - return '%.3g%sG' % (byte / 2**30.0, seperator) + return '%.3g%sG' % (byte / 2**30.0, separator) if byte < 2**40: - return '%.4g%sG' % (byte / 2**30.0, seperator) + return '%.4g%sG' % (byte / 2**30.0, separator) if byte < 2**40 * 999: - return '%.3g%sT' % (byte / 2**40.0, seperator) + return '%.3g%sT' % (byte / 2**40.0, separator) if byte < 2**50: - return '%.4g%sT' % (byte / 2**40.0, seperator) + return '%.4g%sT' % (byte / 2**40.0, separator) if byte < 2**50 * 999: - return '%.3g%sP' % (byte / 2**50.0, seperator) + return '%.3g%sP' % (byte / 2**50.0, separator) if byte < 2**60: - return '%.4g%sP' % (byte / 2**50.0, seperator) + return '%.4g%sP' % (byte / 2**50.0, separator) return '>9000' if __name__ == '__main__': diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py index e307e20a..ce6be623 100644 --- a/ranger/fsobject/directory.py +++ b/ranger/fsobject/directory.py @@ -194,7 +194,7 @@ class Directory(FileSystemObject, Accumulator, Loadable, SettingsAware): # time loading. So I can't really be sure if the # size has changed and I'll add a "?". self.infostring = ' %s' % (human_readable(self.size, - seperator=('? ' if self.content_loaded else ' '))) + separator=('? ' if self.content_loaded else ' '))) else: self.size = len(filelist) self.infostring = ' %d' % self.size diff --git a/ranger/gui/widgets/statusbar.py b/ranger/gui/widgets/statusbar.py index 1e2e2520..b7a238da 100644 --- a/ranger/gui/widgets/statusbar.py +++ b/ranger/gui/widgets/statusbar.py @@ -231,17 +231,17 @@ class StatusBar(Widget): if target.marked_items: if len(target.marked_items) == len(target.files): - right.add(human_readable(target.disk_usage, seperator='')) + right.add(human_readable(target.disk_usage, separator='')) else: right.add(human_readable(sum(f.size \ for f in target.marked_items \ - if f.is_file), seperator='')) + if f.is_file), separator='')) right.add("/" + str(len(target.marked_items))) else: - right.add(human_readable(target.disk_usage, seperator='') + + right.add(human_readable(target.disk_usage, separator='') + " sum, ") right.add(human_readable(self.env.get_free_space( \ - target.mount_path), seperator='') + " free") + target.mount_path), separator='') + " free") right.add(" ", "space") if target.marked_items: -- cgit 1.4.1-2-gfad0