次のようなエラーが発生する他のプログラムで関数を呼び出そうとしています:
[\'UnboundLocalError\', ["local variable \'x\' referenced before assignment"]]
助けてください
connect FSN1 @FSN1 @MANTISPORT
connect FSN2 @FSN2 @MANTISPORT
* from commonFunctions import *
* import os
* import sys
* import shutil
import io
*:
#********* Common Variables**********
exactShareNameFound = False
def findExact(logMessage, share):
f = open('logFile', 'w+')
f.write(logMessage)
for line in f:
if line.find('%s')%(share) >= 0: exactShareNameFound = True
if exactShareNameFound: x+= line
if line.find('Share Name')>=0:
if line.find('%s')(share)<0: exactShareNameFound = False
else:
print('ERROR!!')
else:
print('Error in Executing Loop')
return x