# Buggy code
def _check_recipe_date(self, ref, remote):
    try:
        remote_recipe_manifest, ref = self._remote_manager.get_recipe_manifest(
            ref, remote
        )
    except NotFoundException:
        return  # First time uploading this package

    local_manifest = self._cache.package_layout(ref).recipe_manifest()
    if (
        remote_recipe_manifest != local_manifest
        and remote_recipe_manifest.time > local_manifest.time
    ):
        self._print_manifest_information(
            remote_recipe_manifest, local_manifest, ref, remote
        )
        raise ConanException(
            "Remote recipe is newer than local recipe: "
            "\n Remote date: %s\n Local date: %s"
            % (remote_recipe_manifest.time, local_manifest.time)
        )

    return remote_recipe_manifest


# Traceback (AttributeError)
[b] $ sh -c "conan upload \* -r 090a7942-cd0f-45af-9347-465cbbe94a6e --confirm --all --no-overwrite "
MicroblinkConanFile/3.0.2@microblink/stable: Not found in local cache, looking in remotes...
MicroblinkConanFile/3.0.2@microblink/stable: Trying with '090a7942-cd0f-45af-9347-465cbbe94a6e'...
Downloading conanmanifest.txt

Downloading conanfile.py

MicroblinkConanFile/3.0.2@microblink/stable: Downloaded recipe revision 0
Uploading to remote '090a7942-cd0f-45af-9347-465cbbe94a6e':
Uploading CoreUtils/2.2.0@microblink/master to remote '090a7942-cd0f-45af-9347-465cbbe94a6e'
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/conans/client/command.py", line 1579, in run
method(args[0][1:])
File "/usr/lib/python3.7/site-packages/conans/client/command.py", line 1182, in upload
retry_wait=args.retry_wait, integrity_check=args.check)
File "/usr/lib/python3.7/site-packages/conans/client/conan_api.py", line 93, in wrapper
return f(*args, **kwargs)
File "/usr/lib/python3.7/site-packages/conans/client/conan_api.py", line 868, in upload
retry_wait, integrity_check, policy, remote_name, query=query)
File "/usr/lib/python3.7/site-packages/conans/client/cmd/uploader.py", line 88, in upload
integrity_check, policy, remote, upload_recorder)
File "/usr/lib/python3.7/site-packages/conans/client/cmd/uploader.py", line 190, in _upload_ref
self._upload_recipe(ref, conanfile, retry, retry_wait, policy, recipe_remote)
File "/usr/lib/python3.7/site-packages/conans/client/cmd/uploader.py", line 230, in _upload_recipe
remote, remote_manifest)
File "/usr/lib/python3.7/site-packages/conans/client/cmd/uploader.py", line 344, in _recipe_files_to_upload
if remote_manifest == local_manifest:
File "/usr/lib/python3.7/site-packages/conans/model/manifest.py", line 132, in __eq__
return self.file_sums == other.file_sums
AttributeError: 'NoneType' object has no attribute 'file_sums'

ERROR: 'NoneType' object has no attribute 'file_sums'

# Fixed code
def _check_recipe_date(self, ref, remote, local_manifest):
    try:
        remote_recipe_manifest, ref = self._remote_manager.get_recipe_manifest(
            ref, remote
        )
    except NotFoundException:
        return  # First time uploading this package

    if (
        remote_recipe_manifest != local_manifest
        and remote_recipe_manifest.time > local_manifest.time
    ):
        self._print_manifest_information(
            remote_recipe_manifest, local_manifest, ref, remote
        )
        raise ConanException(
            "Remote recipe is newer than local recipe: "
            "\n Remote date: %s\n Local date: %s"
            % (remote_recipe_manifest.time, local_manifest.time)
        )

    return remote_recipe_manifest