You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I change sed.no_autoprint to False, I get no error but I doesn't work either. Calling pythonsed -e /name/d success.txt worked fine.
Traceback (most recent call last):
File "./ci.py", line 7, in <module>
parser.main(argv[1:])
File "/home/oskar/workspace/aur-ci/aurci/parser.py", line 30, in main
commands(args.command, args.package, args.verbose, args.quiet)
File "/home/oskar/workspace/aur-ci/aurci/parser.py", line 17, in commands
getattr(command_class[0](package, verbosity, output), command_class[1])()
File "/home/oskar/workspace/aur-ci/aurci/bootstrap.py", line 42, in pull
self.delete_package_line("success.txt")
File "/home/oskar/workspace/aur-ci/aurci/general.py", line 18, in delete_package_line
sed.apply(file, "test.txt")
File "/usr/lib/python3.8/site-packages/PythonSed/sed.py", line 179, in apply
self.printline(self.PS)
File "/usr/lib/python3.8/site-packages/PythonSed/sed.py", line 139, in printline
print(line, file=self.output)
AttributeError: 'str' object has no attribute 'write'
The text was updated successfully, but these errors were encountered:
There are two problems. Biggest in pythonsed: using a filename as output parameter was not implemented. This is fixed now and tested in continuous integration. Second problem is you used same file name for input and output. As the process starts by creating the output file, this implies erasing at the same time the input file (something like "type tmp.txt > tmp.txt"). There is no control for that. Thanks for reporting.
Python Version: 3.8.2
Code:
When I change
sed.no_autoprint
toFalse
, I get no error but I doesn't work either. Callingpythonsed -e /name/d success.txt
worked fine.The text was updated successfully, but these errors were encountered: