summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2012-08-14 16:09:32 +0200
committerhut <hut@lavabit.com>2012-08-14 16:09:32 +0200
commit8a13baa3dfd2922672b5feca01b2b81d8058c903 (patch)
tree6a1640416b4a038496a29fea2365c81d26ae3ef4 /ranger
parent6e37c9520e9365f717d0e40c89cc71663eb2f80d (diff)
downloadranger-8a13baa3dfd2922672b5feca01b2b81d8058c903.tar.gz
ranger.__init__: cleaner ranger.log()
Diffstat (limited to 'ranger')
-rw-r--r--ranger/__init__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/ranger/__init__.py b/ranger/__init__.py
index ea94f53c..3d56e052 100644
--- a/ranger/__init__.py
+++ b/ranger/__init__.py
@@ -42,10 +42,10 @@ def log(*objects, **keywords):
 	"""
 	from ranger import arg
 	if LOGFILE is None or not arg.debug or arg.clean: return
-	start = 'start' in keywords and keywords['start'] or 'ranger:'
-	sep   =   'sep' in keywords and keywords['sep']   or ' '
-	_file =  'file' in keywords and keywords['file']  or open(LOGFILE, 'a')
-	end   =   'end' in keywords and keywords['end']   or '\n'
+	start = keywords.get('start', 'ranger:')
+	sep   = keywords.get('sep', ' ')
+	end   = keywords.get('end', '\n')
+	_file = keywords['file'] if 'file' in keywords else open(LOGFILE, 'a')
 	_file.write(sep.join(map(str, (start, ) + objects)) + end)
 
 
kartik/mu/commit/html/display.mu.html?h=main&id=f5465e1220d73e237c51897b7d1211ec53b0dc04'>f5465e12 ^
dbe12410 ^
a654e4ec ^

c5ffb6e1 ^

a654e4ec ^





c5ffb6e1 ^

a654e4ec ^
c5ffb6e1 ^

4690ce81 ^
dbe12410 ^
f5465e12 ^

dbe12410 ^
c5ffb6e1 ^
f5465e12 ^

dbe12410 ^
f5465e12 ^
c5ffb6e1 ^
dbe12410 ^
c5ffb6e1 ^
dbe12410 ^
c5ffb6e1 ^
dbe12410 ^
c5ffb6e1 ^
dbe12410 ^
c5ffb6e1 ^
dbe12410 ^
dbe12410 ^
c5ffb6e1 ^



a654e4ec ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58