
import os
import sys
import glob
from subprocess import check_call

try:
    install_share_dir = sys.argv[1]
    cca_dir = os.path.join(install_share_dir, "cca")
    print("Modifying *.cca files in " + cca_dir)
    for f in glob.glob(os.path.join(cca_dir, "*.cca")):
        check_call(["sed", "--in-place", "s/\.la/.so/", f])
except:
    print("Error in post-install modification of *.cca files.")
    sys.exit(1)


import os
import sys
import glob
from subprocess import check_call

try:
    install_share_dir = sys.argv[1]
    cca_dir = os.path.join(install_share_dir, "cca")
    print("Modifying *.cca files in " + cca_dir)
    for f in glob.glob(os.path.join(cca_dir, "*.cca")):
        check_call(["sed", "--in-place", "s/\.la/.so/", f])
except:
    print("Error in modification of *.cca files.")
    sys.exit(1)

Change wording in error message
Change wording in error message

  
  import os
  import sys
  import glob
  from subprocess import check_call
  
  try:
      install_share_dir = sys.argv[1]
      cca_dir = os.path.join(install_share_dir, "cca")
      print("Modifying *.cca files in " + cca_dir)
      for f in glob.glob(os.path.join(cca_dir, "*.cca")):
          check_call(["sed", "--in-place", "s/\.la/.so/", f])
  except:
-     print("Error in post-install modification of *.cca files.")
+     print("Error in modification of *.cca files.")
      sys.exit(1)
  
Change wording in error message
## Code Before:

import os
import sys
import glob
from subprocess import check_call

try:
    install_share_dir = sys.argv[1]
    cca_dir = os.path.join(install_share_dir, "cca")
    print("Modifying *.cca files in " + cca_dir)
    for f in glob.glob(os.path.join(cca_dir, "*.cca")):
        check_call(["sed", "--in-place", "s/\.la/.so/", f])
except:
    print("Error in post-install modification of *.cca files.")
    sys.exit(1)

## Instruction:
Change wording in error message
## Code After:

import os
import sys
import glob
from subprocess import check_call

try:
    install_share_dir = sys.argv[1]
    cca_dir = os.path.join(install_share_dir, "cca")
    print("Modifying *.cca files in " + cca_dir)
    for f in glob.glob(os.path.join(cca_dir, "*.cca")):
        check_call(["sed", "--in-place", "s/\.la/.so/", f])
except:
    print("Error in modification of *.cca files.")
    sys.exit(1)
