Skip to content

Commit a9bb828

Browse files
committed
fixed unnecessary items copy
1 parent 63531d5 commit a9bb828

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lsofgraph.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,12 @@ def print_graph(procs, conns):
149149
print("\tp%s [ label = \"%s\\n%s %s\" fillcolor=%s ];" %
150150
(proc['p'], proc['n'], proc['p'], proc['L'], color))
151151
elif 'p' in proc:
152-
if 'L' in proc: # there could be no L flag if process running, but user was removed. lsof: no pwd entry for UID
152+
if 'L' in proc: # there could be no L flag if process running, but user was removed. lsof: no pwd entry for UID
153153
print("\tp%s [ label = \"%s\\n%s %s\" fillcolor=%s ];" %
154-
(proc['p'], proc['c'], proc['p'], proc['L'], color))
154+
(proc['p'], proc['c'], proc['p'], proc['L'], color))
155155
else:
156156
print("\tp%s [ label = \"%s\\n%s %s\" fillcolor=%s ];" %
157-
(proc['p'], proc['c'], proc['p'], "no user", color))
157+
(proc['p'], proc['c'], proc['p'], "no user", color))
158158
if 'R' in proc and proc['R'] in procs:
159159
proc_parent = procs[proc['R']]
160160
if proc_parent:
@@ -163,7 +163,7 @@ def print_graph(procs, conns):
163163
"\tp%s -> p%s [ penwidth=2 weight=100 color=grey60 dir=\"none\" ];" % (proc['R'], proc['p']))
164164

165165
for type, conn in conns.iteritems():
166-
for id, files in conn.items():
166+
for id, files in conn.iteritems():
167167
if len(files) == 2:
168168
if files[0]['proc'] != files[1]['proc']:
169169
label = type + ":\\n" + id

0 commit comments

Comments
 (0)