mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-11-08 15:13:42 +01:00
Fix #9: Warning message for duplicate providers
This commit is contained in:
parent
42b03f768a
commit
de308abded
@ -29,7 +29,7 @@ from distutils.extension import Extension
|
||||
from Cython.Distutils import build_ext
|
||||
import os
|
||||
|
||||
to_remove = """cython_setup.py version.py command_line.py""".split()
|
||||
to_remove = """__init__.py cython_setup.py version.py command_line.py""".split()
|
||||
ext_modules = []
|
||||
|
||||
files = os.listdir('.')
|
||||
|
@ -47,8 +47,18 @@ def create_variables():
|
||||
inside = False
|
||||
icount += 1
|
||||
v = Variable(buffer,icount)
|
||||
if v.name in result:
|
||||
print "Warning: Duplicate provider for %s in"%(v.name)
|
||||
print "- ", v.line.filename[0], " line ", v.line.i
|
||||
print "- ", result[v.name].line.filename[0], " line ", result[v.name].line.i
|
||||
print "Choosing first version"
|
||||
result[v.name] = v
|
||||
for other in v.others:
|
||||
if other in result:
|
||||
print "Warning: Duplicate provider for %s in"%(other)
|
||||
print "- ", v.line.filename[0], " line ", v.line.i
|
||||
print "- ", result[other].line.filename[0], " line ", result[other].line.i
|
||||
print "Choosing first version"
|
||||
result[other] = Variable(buffer,icount,other)
|
||||
buffer = []
|
||||
return result
|
||||
|
Loading…
Reference in New Issue
Block a user