Skip to content

fix: Resolve subprocess import error in perform_import() #16#19

Open
nishair wants to merge 1 commit intolucafon:masterfrom
nishair:fix/subprocess-import-error-16
Open

fix: Resolve subprocess import error in perform_import() #16#19
nishair wants to merge 1 commit intolucafon:masterfrom
nishair:fix/subprocess-import-error-16

Conversation

@nishair
Copy link
Copy Markdown
Contributor

@nishair nishair commented Oct 13, 2025

  • Add missing 'import subprocess' to SqoopImport.py
  • The perform_import() method uses subprocess.PIPE but only had 'from subprocess import call, run'
  • This caused "name 'subprocess' is not defined" NameError when calling perform_import()
  • Add comprehensive unit test to verify perform_import() and perform_export() work correctly
  • Test ensures methods return proper types (CompletedProcess or int) without NameError

Fixes issue #16 where users encountered subprocess NameError when using sqoop.perform_import()

- Add missing 'import subprocess' to SqoopImport.py
- The perform_import() method uses subprocess.PIPE but only had 'from subprocess import call, run'
- This caused "name 'subprocess' is not defined" NameError when calling perform_import()
- Add comprehensive unit test to verify perform_import() and perform_export() work correctly
- Test ensures methods return proper types (CompletedProcess or int) without NameError

Fixes issue lucafon#16 where users encountered subprocess NameError when using sqoop.perform_import()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant