JiscSD / archivematica

Free and open-source digital preservation system designed to maintain standards-based, long-term access to collections of digital objects.
http://www.archivematica.org
GNU Affero General Public License v3.0
0 stars 0 forks source link

MCPClient: add version and agent code to docker image #51

Closed lower29 closed 6 years ago

lower29 commented 6 years ago

We recently changed the Dashboard to read from a version.yml file so that we could specify a different version for the JiscRDSS fork than "vanilla" Archivematica.

However, we also need to make this change for the MCPClient. Without it, the Index AIP task fails because the indexAIP.py script indirectly calls version.get_version(), and we get this error:

  File "/src/MCPClient/lib/clientScripts/indexAIP.py", line 120, in <module>
    sys.exit(index_aip())
  File "/src/MCPClient/lib/clientScripts/indexAIP.py", line 108, in index_aip
    sipName=sip_name,
  File "/src/archivematicaCommon/lib/elasticSearchFunctions.py", line 481, in index_files
    identifiers=identifiers
  File "/src/archivematicaCommon/lib/elasticSearchFunctions.py", line 535, in index_mets_file_metadata
    'archivematicaVersion': version.get_version(),
  File "/src/archivematicaCommon/lib/version.py", line 6, in get_version
    return settings.ARCHIVEMATICA_VERSION
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 49, in __getattr__
    return getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'ARCHIVEMATICA_VERSION'

This pull request makes this change, using the same approach as we used for the Dashboard. It's now working as expected in my local development environment.