Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Chu committed Jul 11, 2019
1 parent 750a19e commit 9fd9d7a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions osh/state.py
Expand Up @@ -816,15 +816,12 @@ def GetSpecialVar(self, op_id):
# Named Vars
#

def _FindCellAndNamespace(self, name, lookup_mode, writing=True):
def _FindCellAndNamespace(self, name, lookup_mode):
"""Helper for getting and setting variable.
Need a mode to skip Temp scopes. For Setting.
Args:
name: the variable name
lookup_mode: scope_e
writing: Is this lookup for a read or a write?
Returns:
cell: The cell corresponding to looking up 'name' with the given mode, or
Expand Down Expand Up @@ -1112,7 +1109,7 @@ def GetVar(self, name, lookup_mode=scope_e.Dynamic):
self.source_name.s = self.arena.GetLineSourceString(span.line_id)
return self.source_name

cell, _ = self._FindCellAndNamespace(name, lookup_mode, writing=False)
cell, _ = self._FindCellAndNamespace(name, lookup_mode)

if cell:
return cell.val
Expand Down

0 comments on commit 9fd9d7a

Please sign in to comment.