From 775fefebe0d6ff9c1a05cf1e7ddab5fd50593261 Mon Sep 17 00:00:00 2001
From: Walter Bender <walter.bender@gmail.com>
Date: Mon, 6 Jun 2011 10:02:26 -0400
Subject: [PATCH] prevent view source display of .pyo, .pyc, .so files (#2854)
Organization: Sugar Labs Foundation
---
src/jarabe/view/viewsource.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/jarabe/view/viewsource.py b/src/jarabe/view/viewsource.py
index a1c0be3..c7e6247 100644
a
|
b
|
class FileViewer(gtk.ScrolledWindow): |
388 | 388 | def _add_dir_to_model(self, dir_path, parent=None): |
389 | 389 | model = self._tree_view.get_model() |
390 | 390 | for f in os.listdir(dir_path): |
391 | | if not f.endswith('.pyc'): |
| 391 | if not f.endswith(('.pyc', '.pyo', '.so', '~')): |
392 | 392 | full_path = os.path.join(dir_path, f) |
393 | 393 | if os.path.isdir(full_path): |
394 | 394 | new_iter = model.append(parent, [f, full_path]) |