Fix syntax.
This commit is contained in:
parent
f08359c73c
commit
445c2c19d2
2 changed files with 3 additions and 3 deletions
|
@ -1146,7 +1146,7 @@ class Cargo(BuildSystem):
|
|||
|
||||
def _parse_go_mod(f):
|
||||
line = f.readline()
|
||||
while f:
|
||||
while line:
|
||||
parts = line.strip().split(' ')
|
||||
if not parts:
|
||||
continue
|
||||
|
@ -1187,7 +1187,7 @@ class Golang(BuildSystem):
|
|||
|
||||
def get_declared_dependencies(self, session, fixers=None):
|
||||
go_mod_path = os.path.join(self.path, 'go.mod')
|
||||
if not os.path.exists(go_mod_path):
|
||||
if os.path.exists(go_mod_path):
|
||||
with open(go_mod_path, 'r') as f:
|
||||
for parts in _parse_go_mod(f):
|
||||
if parts[0] == 'go':
|
||||
|
|
|
@ -284,7 +284,7 @@ class GoRequirement(Requirement):
|
|||
version: Optional[str]
|
||||
|
||||
def __init__(self, version: Optional[str] = None):
|
||||
super(GoPackageRequirement, self).__init__("go")
|
||||
super(GoRequirement, self).__init__("go")
|
||||
self.version = version
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue